r6.0.0:lfds600_queue_dequeue

From liblfds.org
Revision as of 14:07, 4 January 2015 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

/liblfds600/src/lfds600_queue/lfds600_queue_queue.c
/liblfds600/inc/liblfds600.h

Prototype

int lfds600_queue_dequeue( struct lfds600_queue_state *qs, void **user_data );

Parameters

struct lfds600_queue_state *qs

A queue state as allocated by lfds600_queue_new.

void **user_data

The address of a pointer into which the user data will be placed. On an unsuccessful dequeue (which occurs if and only if the queue is empty), *user_data is not modified, as NULL is a valid user data value.

Return Value

Returns 1 if an element was dequeued, returns 0 if an element was no dequeued. The queue being empty is the only situation in which dequeuing does not occur. Note that on an unsuccessful dequeue, *user_data is untouched; it is not set to NULL, since NULL is a valid user data value. Only the return value indicates whether or not the dequeue was successful.

Notes

No notes.

See Also