└───liblfds700 ├───inc │ └───liblfds700 │ lfds700_queue_bounded_singleconsumer_singleproducer.h └───src └───lfds700_queue_bounded_singleconsumer_singleproducer lfds700_queue_bounded_singleconsumer_singleproducer_dequeue.c
void lfds700_queue_bss_dequeue( struct lfds700_queue_bss_state *qbsss, void **key, void **value );
struct lfds700_queue_bss_state *qbsss
- A pointer to an initialized struct lfds700_queue_bss_state.
- A pointer to a void pointer, which is set to the key of the dequeued element.
- A pointer to a void pointer, which is set to the value of the dequeued element.
Returns 1 on a successful dequeue. Returns 0 if dequeing failed. Dequeuing only fails if the queue is empty.
This function dequeues an element from the queue.
Unlike all the other data structures in liblfds, there is with this queue no guarantee that enqueued elements are ever seen by the consumer thread. In practise, they are, and in a very short time - fifty microseconds or whatever it may be; but, unlike the other data structures, there is then on guarantee of visibility simply because the enqueue function has returned. As such dequeue may for a brief time return nothing, when in fact an element has been enqueued.
Coming soon. No, really! (Written 29th Dec 2015).