Difference between revisions of "r7.1.0:Function lfds710 queue bss init valid on current logical core"
Jump to navigation
Jump to search
(No difference)
|
Latest revision as of 18:43, 30 May 2016
Source Files
└───liblfds710 ├───inc │ └───liblfds710 │ lfds710_queue_bounded_singleproducer_singleconsumer.h └───src └───llfds710_queue_bounded_singleproducer_singleconsumer lfds710_queue_bounded_singleproducer_singleconsumer_init.c
Opaque Structures
struct lfds710_queue_bss_element; struct lfds710_queue_bss_state;
Prototype
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 );
Parameters
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.
lfds710_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 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.