FACT++  1.0
unsigned int dtq_sleep ( int  secs)

Definition at line 837 of file dtq.c.

References dim_usleep(), dim_wait(), dtq_sleep_rout(), dtq_start_timer(), and i.

Referenced by initialize(), and runLogWatchDog().

838 {
839 
840 #ifndef NOTHREADS
841  int i;
842  for(i = 0; i < secs*2; i++)
843  {
844  dim_usleep(500000);
845  }
846  return(0);
847 #else
848  sigset_t set, oset;
849 
850  sigemptyset(&set);
851  sigaddset(&set,SIGALRM);
852  sigprocmask(SIG_UNBLOCK, &set, &oset);
853  Dtq_sleeping = 1;
855  do{
856  pause();
857  }while(Dtq_sleeping);
858  sigprocmask(SIG_SETMASK,&oset,0);
859  return(0);
860 #endif
861 }
int i
Definition: db_dim_client.c:21
static int Dtq_sleeping
Definition: dtq.c:824
void dim_usleep(int usecs)
Definition: dtq.c:293
void dtq_sleep_rout(dim_long tag)
Definition: dtq.c:826
void dtq_start_timer(int time, void(*user_routine)(), dim_long tag)
Definition: dtq.c:790
long dim_long
Definition: dim_common.h:57

+ Here is the call graph for this function:

+ Here is the caller graph for this function: