function lfds711_queue_umm_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_umm.h
    └───src
        └───lfds711_queue
                lfds711_queue_umm_enqueue.c

Opaque Structures

struct lfds711_queue_umm_element;
struct lfds711_queue_umm_state;

Prototype

void lfds711_queue_umm_enqueue( struct lfds711_queue_umm_state *qumms,
                                struct lfds711_queue_umm_element *qumme );

Parameters

struct lfds711_queue_umm_state *qumms

A pointer to an initialized struct lfds711_queue_umm_state.

struct lfds711_queue_umm_state *qumme

A pointer to a user-allocated LFDS711_PAL_ATOMIC_ISOLATION_IN_BYTES aligned struct lfds711_queue_umm_element. Stack declared variables will automatically be correctly aligned by the compiler, due to the information in the structure definitions; nothing has to be done. Heap allocated variables however will by no means be correctly aligned and an aligned malloc must be used.

Notes

This function enqueues a queue element, with its key and value, onto the queue. The key and value are both optional, are set by the macros LFDS711_QUEUE_UMM_SET_KEY_IN_ELEMENT and LFDS711_QUEUE_UMM_SET_VALUE_IN_ELEMENT respectively, and can only be set when a queue element is outside of a queue.

See Also