└───liblfds711 ├───inc │ └───liblfds711 │ lfds711_queue_bmm.h └───src └───llfds711_queue lfds711_queue_bmm_init.c
struct lfds711_queue_bmm_element; struct lfds711_queue_bmm_state;
void lfds711_queue_bmm_init_valid_on_current_logical_core( struct lfds711_queue_bmm_state *qbmms, struct lfds711_queue_bmm_element *element_array, lfds711_pal_uint_t number_elements, void *user_state );
struct lfds711_queue_bmm_state *qbmms
- A pointer to a user-allocated LFDS711_PAL_ATOMIC_ISOLATION_IN_BYTES aligned struct lfds711_queue_bmm_state. 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.
struct lfds711_queue_bmm_element *element_array
- A pointer to a user-allocated array of struct lfds711_queue_bmm_element. There are no alignment requirements for this allocation.
- The number of elements in the array pointed to by element_array. The number of elements in the array must be a positive integer power of two, i.e. two, four, eight, sixteen, etc.
- 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.
The number of elements in the array must be a positive integer power of two, i.e. two, four, eight, sixteen, etc.
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.