└───liblfds700 ├───inc │ └───liblfds700 │ lfds700_queue_bounded_singleconsumer_singleproducer.h └───src └───lfds700_queue_bounded_singleconsumer_singleproducer lfds700_queue_bounded_singleconsumer_singleproducer_enqueue.c
void lfds700_queue_bss_enqueue( 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 void pointer of user data which will be queued into the queue as the key.
- A void pointer of user data which will be queued into the queue as the value.
Returns 1 on a successful enqueue. Returns 0 if enqueing failed. Enqueuing only fails if the queue is full.
This function takes a user-provided void pointer (which typically points to user allocated store, but could of course be used directly) and enqueues it into 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.
Coming soon. No, really! (Written 29th Dec 2015).