macro LFDS700_LIST_ASU_GET_VALUE_FROM_ELEMENT
Jump to navigation
Jump to search
Source File
└───liblfds700 └───inc └───liblfds700 lfds700_list_addonly_singlylinked_unordered.h
Opaque Structures
struct lfds700_list_asu_element;
Macro
#define LFDS700_LIST_ASU_GET_VALUE_FROM_ELEMENT( list_asu_element )
Parameters
list_asu_element
- A struct lfds700_list_asu_element. Not a pointer to it - the struct itself.
Return Value
Returns a void pointer, the value from the element.
Notes
As with all liblfds macros, the macro operates on the structure itself, not a pointer to it.
The value in an element is set and set atomically by LFDS700_LIST_ASU_SET_VALUE_IN_ELEMENT and this get macro issues a load barrier before reading, which ensures that by the time LFDS700_LIST_ASU_SET_VALUE_IN_ELEMENT returns, the value set will be seen by all readers.
This contrasts to the bouded, single consumer, single producer queue, which only guarantees that the order of queuing will be honoured; it does not guarantee that by the time the enqueue function returns, readers will be able to dequeue the newly enqueued element.