function lfds711_queue_bmm_enqueue

From liblfds.org
Revision as of 18:11, 16 February 2017 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

└───liblfds711
    ├───inc
    │   └───liblfds711
    │           lfds711_queue_bmm.h
    └───src
        └───lfds711_queue
                lfds711_queue_bmm_enqueue.c

Opaque Structures

struct lfds711_queue_bmm_state;

Prototype

int lfds711_queue_bmm_enqueue( struct lfds711_queue_bmm_state *qbmms, void *key, void *value );

Parameters

struct lfds711_queue_bmm_state *qbmms

A pointer to an initialized struct lfds711_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