function lfds700_hash_a_cleanup
Jump to navigation
Jump to search
Source Files
└───liblfds700 ├───inc │ └───liblfds700 │ lfds700_hash_addonly.h └───src └───llfds700_hash_addonly lfds700_hash_addonly_cleanup.c
Opaque Structures
struct lfds700_hash_a_element; struct lfds700_hash_a_state;
Prototype
void lfds700_hash_a_cleanup( struct lfds700_hash_a_state *has, void (*element_cleanup_function)(struct lfds700_hash_a_state *has, struct lfds700_hash_a_element *hae) );
Parameters
struct lfds700_hash_a_state *has
- A pointer to an initialized struct lfds700_hash_a_state.
void (*element_cleanup_function)(struct lfds700_hash_a_state *has, struct lfds700_hash_a_element *hae)
- A callback function which is called with every element present in the hash at the time of cleanup. This argument can be NULL.
Notes
The cleanup function actually does no work except, if the callback function is provided, to make all hash elements valid for the current logical core and to iterate over the hash and pass each element to the callback function.
The user can in the callback function use the LFDS700_HASH_A_GET_USER_STATE_FROM_STATE macro on the hash state to get hold of the user state provided when the hash was initialized.
Example
Coming soon. No, really! (Written 29th Dec 2015).