UDI_FIRST_ELEMENT, UDI_LAST_ELEMENT, UDI_NEXT_ELEMENT, UDI_PREV_ELEMENT


Get first/last/next/previous element in queue

SYNOPSIS

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

			((listhead)->next)
 
#define UDI_LAST_ELEMENT(listhead) \

			((listhead)->prev)
 
#define UDI_NEXT_ELEMENT(element) \

			((element)->next)
 
#define UDI_PREV_ELEMENT(element) \

			((element)->prev)
 

ARGUMENTS listhead is a pointer to a list head element.

element is a pointer to a queue element.

DESCRIPTION UDI_FIRST_ELEMENT returns a pointer to the first element in the queue specified by listhead.

UDI_LAST_ELEMENT returns a pointer to the last element in the queue specified by listhead.

UDI_NEXT_ELEMENT returns a pointer to the next queue element immediately after element.

UDI_PREV_ELEMENT returns a pointer to the queue element immediately preceding element.

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

udi_queue_t *UDI_FIRST_ELEMENT (

			udi_queue_t *listhead );
 
udi_queue_t *UDI_LAST_ELEMENT (

			udi_queue_t *listhead );
 
udi_queue_t *UDI_NEXT_ELEMENT (

			udi_queue_t *element );
 
udi_queue_t *UDI_PREV_ELEMENT (

			udi_queue_t *element );
 

REFERENCES udi_queue_t


UDI Core Specification Contents