DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_enqueue(3udi)


Insert a queue element into a queue

SYNOPSIS

#include <udi.h>

void udi_enqueue (

udi_queue_t *new_el,

udi_queue_t *old_el );

ARGUMENTS new_el is a pointer to a queue element.

old_el is a pointer to the queue's list head or an element already on the queue.

DESCRIPTION udi_enqueue inserts new_el after old_el in the queue to which old_el belongs.

udi_enqueue shall be equivalent to the following implementation:

void udi_enqueue(

	udi_queue_t *new_el,

	udi_queue_t *old_el)

{

	new_el->next = old_el->next;

	new_el->prev = old_el;

	old_el->next->prev = new_el;

	old_el->next = new_el;

}
 

REFERENCES udi_dequeue, udi_queue_t


UDI Core Specification Contents