FACT++  1.0
static int rem_deleted_entries ( int  queue_id)
static

Definition at line 524 of file dtq.c.

References dll_get_next(), dll_remove(), Memory::free(), QUEUE_ENT::queue_head, queue_id, QUEUE_ENT::remove_entries, and timer_entry::time.

Referenced by scan_it().

525 {
526  TIMR_ENT *auxp, *prevp, *queue_head;
527  int n;
528 
529  DISABLE_AST
530  queue_head = timer_queues[queue_id].queue_head;
532  if(queue_head)
533  {
534  auxp = queue_head;
535  prevp = auxp;
536  while( (auxp = (TIMR_ENT *)dll_get_next((DLL *)queue_head, (DLL *)auxp)) )
537  {
538  if(auxp->time == -1)
539  {
540  dll_remove(auxp);
541  free(auxp);
542  auxp = prevp;
543  n--;
544  if(!n)
545  break;
546  }
547  else
548  prevp = auxp;
549  }
550  }
551  ENABLE_AST;
552  return(1);
553 }
Definition: dim.h:370
static QUEUE_ENT timer_queues[MAX_TIMER_QUEUES+2]
Definition: dtq.c:54
void dll_remove(DLL *item)
Definition: dll.c:100
TIMR_ENT * queue_head
Definition: dtq.c:49
Definition: dim.h:530
int remove_entries
Definition: dtq.c:50
void free(void *mem)
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66
int time
Definition: dim.h:374
static int queue_id
Definition: tcpip.c:93

+ Here is the call graph for this function:

+ Here is the caller graph for this function: