Lines Matching refs:queue
41 static irda_queue_t *dequeue_general( irda_queue_t **queue, irda_queue_t* element);
84 irda_queue_t* queue; in hashbin_clear() local
94 queue = dequeue_first( (irda_queue_t**) &hashbin->hb_queue[i]); in hashbin_clear()
95 while (queue) { in hashbin_clear()
97 (*free_func)(queue); in hashbin_clear()
98 queue = dequeue_first( in hashbin_clear()
117 irda_queue_t* queue; in hashbin_delete() local
128 queue = dequeue_first((irda_queue_t**) &hashbin->hb_queue[i]); in hashbin_delete()
129 while (queue ) { in hashbin_delete()
131 (*free_func)(queue); in hashbin_delete()
132 queue = dequeue_first( in hashbin_delete()
554 static void __enqueue_last( irda_queue_t **queue, irda_queue_t* element) in __enqueue_last() argument
561 if ( *queue == NULL ) { in __enqueue_last()
565 element->q_next = element->q_prev = *queue = element; in __enqueue_last()
571 element->q_prev = (*queue)->q_prev; in __enqueue_last()
573 (*queue)->q_prev = element; in __enqueue_last()
574 element->q_next = *queue; in __enqueue_last()
578 inline void enqueue_last( irda_queue_t **queue, irda_queue_t* element) in enqueue_last() argument
585 __enqueue_last( queue, element); in enqueue_last()
596 void enqueue_first(irda_queue_t **queue, irda_queue_t* element) in enqueue_first() argument
604 if ( *queue == NULL ) { in enqueue_first()
608 element->q_next = element->q_prev = *queue = element; in enqueue_first()
614 element->q_next = (*queue); in enqueue_first()
615 (*queue)->q_prev->q_next = element; in enqueue_first()
616 element->q_prev = (*queue)->q_prev; in enqueue_first()
617 (*queue)->q_prev = element; in enqueue_first()
618 (*queue) = element; in enqueue_first()
628 void enqueue_queue( irda_queue_t** queue, irda_queue_t** list ) in enqueue_queue() argument
635 if ( *queue ) { in enqueue_queue()
636 (*list)->q_prev->q_next = (*queue); in enqueue_queue()
637 (*queue)->q_prev->q_next = (*list); in enqueue_queue()
639 (*list)->q_prev = (*queue)->q_prev; in enqueue_queue()
640 (*queue)->q_prev = tmp; in enqueue_queue()
642 *queue = (*list); in enqueue_queue()
655 static void enqueue_second(irda_queue_t **queue, irda_queue_t* element)
662 if ( *queue == NULL ) {
666 element->q_next = element->q_prev = *queue = element;
672 element->q_prev = (*queue);
673 (*queue)->q_next->q_prev = element;
674 element->q_next = (*queue)->q_next;
675 (*queue)->q_next = element;
686 irda_queue_t *dequeue_first(irda_queue_t **queue) in dequeue_first() argument
695 ret = *queue; in dequeue_first()
697 if ( *queue == NULL ) { in dequeue_first()
701 } else if ( (*queue)->q_next == *queue ) { in dequeue_first()
706 *queue = NULL; in dequeue_first()
711 (*queue)->q_prev->q_next = (*queue)->q_next; in dequeue_first()
712 (*queue)->q_next->q_prev = (*queue)->q_prev; in dequeue_first()
713 *queue = (*queue)->q_next; in dequeue_first()
727 static irda_queue_t *dequeue_general(irda_queue_t **queue, irda_queue_t* element) in dequeue_general() argument
736 ret = *queue; in dequeue_general()
738 if ( *queue == NULL ) { in dequeue_general()
742 } else if ( (*queue)->q_next == *queue ) { in dequeue_general()
747 *queue = NULL; in dequeue_general()
755 if ( (*queue) == element) in dequeue_general()
756 (*queue) = element->q_next; in dequeue_general()