function lfds710_freelist_cleanup
Jump to navigation
Jump to search
Source Files
└───liblfds710 ├───inc │ └───liblfds710 │ lfds710_freelist.h └───src └───lfds710_freelist lfds710_freelist_cleanup.c
Opaque Structures
struct lfds710_freelist_element; struct lfds710_freelist_state;
Prototype
void lfds710_freelist_cleanup( struct lfds710_freelist_state *fs, void (*element_cleanup_callback)(struct lfds710_freelist_state *fs, struct lfds710_freelist_element *fe) );
Parameters
struct lfds710_freelist_state *fs
- A pointer to an initialized struct lfds710_freelist_state.
void (*element_cleanup_callback)(struct lfds710_freelist_state *fs, struct lfds710_freelist_element *fe)
- A callback function which is called with every element present in the freelist 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 pushed freelist elements valid for the current logical core and to iterate over the freelist and pass each element to the callback function.
The user can in the callback function use the LFDS710_FREELIST_GET_USER_STATE_FROM_STATE macro on the freelist state to get hold of the user state provided when the freelist was initialized.