FACT++  1.0
int dtq_create ( )

Definition at line 353 of file dtq.c.

References dim_dtq_init(), dim_init_threads(), dll_init(), i, Memory::malloc(), MAX_TIMER_QUEUES, and QUEUE_ENT::queue_head.

Referenced by app_initialize(), close_dns(), did_init(), dim_tcpip_init(), dis_start_serving_dns(), main(), open_dns(), request_command(), and request_service().

354 {
355  int i;
356  extern void dim_init_threads(void);
357 
358  if(!Threads_off)
359  {
361  }
362  dim_dtq_init(0);
363  for( i = 1; i < MAX_TIMER_QUEUES; i++ )
364  if( timer_queues[i].queue_head == 0 )
365  break;
366 
367  if( i == MAX_TIMER_QUEUES )
368  return(0);
369 
370  timer_queues[i].queue_head = (TIMR_ENT *)malloc( sizeof(TIMR_ENT) );
371  memset( timer_queues[i].queue_head, 0, sizeof(TIMR_ENT) );
372  dll_init( (DLL *)timer_queues[i].queue_head);
373 
374  return(i);
375 }
int i
Definition: db_dim_client.c:21
void * malloc()
Definition: EventBuilder.cc:99
Definition: dim.h:370
int dim_dtq_init(int thr_flag)
Definition: dtq.c:91
void dll_init(DLL *head)
Definition: dll.c:14
static QUEUE_ENT timer_queues[MAX_TIMER_QUEUES+2]
Definition: dtq.c:54
TIMR_ENT * queue_head
Definition: dtq.c:49
void dim_init_threads()
Definition: dim_thr.c:399
Definition: dim.h:530
static int Threads_off
Definition: dtq.c:71
#define MAX_TIMER_QUEUES
Definition: dtq.c:31

+ Here is the call graph for this function:

+ Here is the caller graph for this function: