queue_pop()

Remove the head element from the specified queue.

Synopsis:

#include <hnm/queue.h>
 
queue_Element* queue_pop(queue_Queue *queue)

Arguments:

queue

A pointer to a queue data structure whose head element is to be removed.

Library:

libhnm

Description:

The queue_pop() function will remove the head queue_Element instance from the specified queue. The function is robust to instances where the provided queue is empty; the queue remains unchanged in this scenario.

Returns:

A pointer to the queue_Element that was removed from the queue structure. If the queue_Element is the first element of a containing structure, you should be able to cast this pointer to the enclosing structure's type to access the specialized structure's members.