function lfds700_queue_bss_init_valid_on_current_logical_core
Jump to navigation
Jump to search
Source Files
└───liblfds700 ├───inc │ └───liblfds700 │ lfds700_queue_bounded_singleconsumer_singleproducer.h └───src └───llfds700_queue_bounded_singleconsumer_singleproducer lfds700_queue_bounded_singleconsumer_singleproducer_init.c
Opaque Structures
struct lfds700_queue_bss_element; struct lfds700_queue_bss_state;
Prototype
void lfds700_queue_bss_init( struct lfds700_queue_bss_state *qbsss, struct lfds700_queue_bss_element *element_array, lfds700_uint_t number_elements, void *user_state );
Parameters
struct lfds700_queue_bss_state *qbsss
- A pointer to a user-allocated struct lfds700_queue_bss_state.
struct lfds700_queue_bss_element *element_array
- An array of queue elements, which form the store for the queue.
lfds700_uint_t number_elements
- The number of pointers in the array pointed to by the argument element_array.
void *user_state
- A pointer to void, supplied by the user, which is returned to the user in various callback functions, permitting the user to pass his own state into those functions. This argument can be NULL.
Notes
As the function name indicates, the initialization work performed on the queue state is only valid on the current logical core. To make this work valid on other logical cores, threads on other cores must call LFDS700_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE.
This function instantiates a queue by initializing the queue state. The caller is responsible for all memory allocation and, after lfds700_queue_bss_cleanup is called, for all deallocation.
Example
Coming soon. No, really! (Written 29th Dec 2015).