UDI_DEQUEUE_XXX, UDI_QUEUE_REMOVE


Remove an element from a queue

SYNOPSIS

#include <udi.h>
#define UDI_DEQUEUE_HEAD(listhead) \

		udi_dequeue((listhead)->next)
 
#define UDI_DEQUEUE_TAIL(listhead) \

		udi_dequeue((listhead)->prev)
 
#define UDI_QUEUE_REMOVE(element) \

		((void)udi_dequeue(element))
 

ARGUMENTS listhead is a pointer to a list head element.

element is a pointer to a queue element.

DESCRIPTION UDI_DEQUEUE_HEAD removes the element at the head of the queue specified by listhead, and returns it to the caller.

UDI_DEQUEUE_TAIL removes the element at the tail of the queue specified by listhead, and returns it to the caller.

UDI_QUEUE_REMOVE removes element from its queue. With the exception that there is no return value, this macro is equivalent to the udi_dequeue function. Since the caller is specifying the element to remove, it is expected that normal usage would be to call this macro without expecting a return value, so the function return is voided out.

These macros must be called as if they, respectively, had the following functional interfaces:

udi_queue_t *UDI_DEQUEUE_HEAD (

			udi_queue_t *listhead );
 
udi_queue_t *UDI_DEQUEUE_TAIL (

			udi_queue_t *listhead );
 
void UDI_QUEUE_REMOVE (

			udi_queue_t *element );
 

REFERENCES udi_dequeue


UDI Core Specification Contents