└───liblfds710 ├───inc │ └───liblfds710 │ lfds710_queue_bounded_singleproducer_singleconsumer.h └───src └───llfds710_queue_bounded_singleproducer_singleconsumer lfds710_queue_bounded_singleproducer_singleconsumer_init.c
struct lfds710_queue_bss_element; struct lfds710_queue_bss_state;
void lfds710_queue_bss_init( struct lfds710_queue_bss_state *qbsss, struct lfds710_queue_bss_element *element_array, lfds710_uint_t number_elements, void *user_state );
struct lfds710_queue_bss_state *qbsss
- A pointer to a user-allocated struct lfds710_queue_bss_state.
struct lfds710_queue_bss_element *element_array
- An array of queue elements, which form the store for the queue.
- The number of pointers in the array pointed to by the argument element_array.
- 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.
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 LFDS710_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 lfds710_queue_bss_cleanup is called, for all deallocation.