macro LFDS700_LIST_AOS_SET_KEY_IN_ELEMENT
Source File
└───liblfds700 └───inc └───liblfds700 lfds700_list_addonly_ordered_singlylinked.h
Opaque Structures
struct lfds700_list_aos_element;
Macro
#define LFDS700_LIST_AOS_SET_KEY_IN_ELEMENT( list_aos_element, new_key )
Parameters
list_aos_element
- A struct lfds700_list_aos_element. Not a pointer to it - the struct itself.
new_key
- A void pointer, which the key in list_aos_element is set to.
Return Value
No return value.
Notes
As with all liblfds macros, the macro operates on the structure itself, not a pointer to it.
The key can only be set before an element enters the list. If it is set after, the list will likely be broken (as the new key, likely being different to the old key, would most likely require the element to be in a different position in the tree, and this element movement is not supported) and also, key is not set atomically, so that even if a change was made, there is in principle no guarantee any other logical core would see that change anyway.
Key is not set atomically because it is known it will only be set before an element enters the tree. Matters can be (and have been) arranged to ensure key is despite the lack of an atomic set correctly propagated to other logical cores, but this is a behaviour of the linking code, not of the macro which sets key.
Example
Coming soon. No, really! (Written 29th Dec 2015).