function lfds710_queue_bmm_enqueue

From liblfds.org
Revision as of 18:41, 30 May 2016 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

└───liblfds710
    ├───inc
    │   └───liblfds710
    │           lfds710_queue_bmm.h
    └───src
        └───lfds710_queue
                lfds710_queue_bmm_enqueue.c

Opaque Structures

struct lfds710_queue_bmm_state;

Prototype

int lfds710_queue_bmm_enqueue( struct lfds710_queue_bmm_state *qbmms, void *key, void *value );

Parameters

struct lfds710_queue_bmm_state *qbmms

A pointer to an initialized struct lfds710_queue_bmm_state.

void *key

A void pointer, which the key in the queue element is set to. This argument can be NULL, and the actual value of the key is not used in any way by the queue.

void *value

A void pointer, which the value in the queue element is set to. This argument can be NULL, and the actual value of the value is not used in any way by the queue.

Return Value

Returns 1 on a successful enqueue. Returns 0 if enqueing failed. Enqueuing fails if the queue is full.

Notes

Remember that this is a relaxed data structure, so enqueues and dequeues performed on any given logical core may well not be seen immediately by other logical cores; as such for example a queue which according to programme logic must have free space due to dequeue operations may for a short period after those dequeue operations still be seen as full on other logical cores.

See Also