└───liblfds711 ├───inc │ └───liblfds711 │ lfds711_queue_bounded_singleproducer_singleconsumer.h └───src └───llfds711_queue_bounded_singleproducer_singleconsumer lfds711_queue_bounded_singleproducer_singleconsumer_init.c
struct lfds711_queue_bss_element; struct lfds711_queue_bss_state;
void lfds711_queue_bss_init( struct lfds711_queue_bss_state *qbsss, struct lfds711_queue_bss_element *element_array, lfds711_uint_t number_elements, void *user_state );
struct lfds711_queue_bss_state *qbsss
- A pointer to a user-allocated struct lfds711_queue_bss_state.
struct lfds711_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 LFDS711_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 lfds711_queue_bss_cleanup is called, for all deallocation.