UDI_ENQUEUE_XXX,
UDI_QUEUE_INSERT_XXX


Insert an element into a queue

SYNOPSIS

#include <udi.h>
#define UDI_ENQUEUE_HEAD(listhead, element) \

		udi_enqueue(element, listhead)
 
#define UDI_ENQUEUE_TAIL(listhead, element) \

		udi_enqueue(element, (listhead)->prev)
 
#define UDI_QUEUE_INSERT_AFTER(old_el, new_el) \

		udi_enqueue(new_el, old_el)
 
#define UDI_QUEUE_INSERT_BEFORE(old_el, new_el) \

		udi_enqueue(new_el, (old_el)->prev)
 

ARGUMENTS listhead is a pointer to a list head element.

element is a pointer to a queue element.

old_el is a pointer to a queue element that is currently linked into a UDI queue.

new_el is a pointer to a queue element that is not currently linked into a UDI queue.

DESCRIPTION UDI_ENQUEUE_HEAD inserts element at the head of the queue specified by listhead. This macro is equivalent to the udi_enqueue function.

UDI_ENQUEUE_TAIL appends element to the tail of the queue specified by listhead.

UDI_QUEUE_INSERT_AFTER inserts the queue element new_el after the element old_el.

UDI_QUEUE_INSERT_BEFORE inserts the queue element new_el in front of the element old_el.

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

void UDI_ENQUEUE_HEAD (

		udi_queue_t *listhead,

		udi_queue_t *element );
 
void UDI_ENQUEUE_TAIL (

		udi_queue_t *listhead,

		udi_queue_t *element );
 
void UDI_QUEUE_INSERT_AFTER (

		udi_queue_t *old_el,

		udi_queue_t *new_el );
 
void UDI_QUEUE_INSERT_BEFORE (

		udi_queue_t *old_el,

		udi_queue_t *new_el );
 

REFERENCES udi_enqueue


UDI Core Specification Contents