https://www.liblfds.org/mediawiki/index.php?title=r7.1.1:Function_lfds711_queue_bmm_init_valid_on_current_logical_core&feed=atom&action=historyr7.1.1:Function lfds711 queue bmm init valid on current logical core - Revision history2024-03-29T01:30:02ZRevision history for this page on the wikiMediaWiki 1.36.0https://www.liblfds.org/mediawiki/index.php?title=r7.1.1:Function_lfds711_queue_bmm_init_valid_on_current_logical_core&diff=1008&oldid=prevAdmin at 14:41, 22 February 20172017-02-22T14:41:39Z<p></p>
<p><b>New page</b></p><div>{{DISPLAYTITLE:function lfds711_queue_bmm_init_valid_on_current_logical_core}}<br />
==Source Files==<br />
└───liblfds711<br />
├───inc<br />
│ └───liblfds711<br />
│ lfds711_queue_bmm.h<br />
└───src<br />
└───llfds711_queue<br />
lfds711_queue_bmm_init.c<br />
<br />
==Opaque Structures==<br />
struct [[r7.1.1:struct lfds711_queue_bmm_element|lfds711_queue_bmm_element]];<br />
struct [[r7.1.1:struct lfds711_queue_bmm_state|lfds711_queue_bmm_state]];<br />
<br />
==Prototype==<br />
void lfds711_queue_bmm_init_valid_on_current_logical_core( struct lfds711_queue_bmm_state *qbmms,<br />
struct lfds711_queue_bmm_element *element_array,<br />
lfds711_pal_uint_t number_elements,<br />
void *user_state );<br />
<br />
==Parameters==<br />
''struct lfds711_queue_bmm_state *qbmms''<br />
: 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.<br />
<br />
''struct lfds711_queue_bmm_element *element_array''<br />
: A pointer to a user-allocated array of ''struct lfds711_queue_bmm_element''. There are no alignment requirements for this allocation.<br />
<br />
''lfds711_pal_uint_t number_elements''<br />
: 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.<br />
<br />
''void *user_state''<br />
: 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.<br />
<br />
==Notes==<br />
The number of elements in the array must be a positive integer power of two, i.e. two, four, eight, sixteen, etc.<br />
<br />
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 ''[[r7.1.1:define LFDS711_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE|LFDS711_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE]]''.<br />
<br />
==See Also==<br />
* [[r7.1.1:Queue (bounded, many producer, many consumer)|Queue (bounded, many producer, many consumer)]]<br />
* ''[[r7.1.1:function lfds711_queue_bmm_cleanup|lfds711_queue_bmm_cleanup]]''</div>Admin