FACT++  1.0
void dim_stop ( )

Definition at line 186 of file dim_thr.c.

References ALRM_thread, dim_dtq_stop(), DIM_INIT_Sema, dim_tcpip_stop(), DIM_THR_init_done, and IO_thread.

Referenced by dic_stop(), dim_signal_cond(), dim_stop_threads(), and Java_dim_Client_stop().

187 {
188  void dim_tcpip_stop(), dim_dtq_stop();
189 /*
190  int i;
191  int n = 0;
192 
193  for( i = 0; i< Curr_N_Conns; i++ )
194  {
195  if(Net_conns[i].channel != 0)
196  n++;
197  }
198  if(n)
199  return;
200 */
201  if(IO_thread)
202  pthread_cancel(IO_thread);
203  if(ALRM_thread)
204  pthread_cancel(ALRM_thread);
205  if(IO_thread)
206  pthread_join(IO_thread,0);
207  if(ALRM_thread)
208  pthread_join(ALRM_thread,0);
209 #ifndef darwin
210  sem_destroy(&DIM_INIT_Sema);
211  /*
212  sem_destroy(&DIM_WAIT_Sema);
213  */
214 #else
215  sem_unlink("/Dim_INIT_Sem");
216  /*
217  sem_unlink("/Dim_WAIT_Sem");
218  */
219  sem_close(DIM_INIT_Semap);
220  /*
221  sem_close(DIM_WAIT_Semap);
222  */
223 #endif
224  dim_tcpip_stop();
225  dim_dtq_stop();
226  IO_thread = 0;
227  ALRM_thread = 0;
228  DIM_THR_init_done = 0;
229 }
void dim_tcpip_stop()
Definition: tcpip.c:341
int DIM_THR_init_done
Definition: dim_thr.c:37
pthread_t IO_thread
Definition: dim_thr.c:18
pthread_t ALRM_thread
Definition: dim_thr.c:19
sem_t DIM_INIT_Sema
Definition: dim_thr.c:23
void dim_dtq_stop()
Definition: dtq.c:200

+ Here is the call graph for this function:

+ Here is the caller graph for this function: