function lfds700_queue_cleanup
Jump to navigation
Jump to search
Source Files
└───liblfds700 ├───inc │ └───liblfds700 │ lfds700_queue.h └───src └───lfds700_queue lfds700_queue_cleanup.c
Enums
enum lfds700_misc_flag { LFDS700_MISC_FLAG_LOWERED, LFDS700_MISC_FLAG_RAISED };
Opaque Structures
struct lfds700_queue_element; struct lfds700_queue_state;
Prototype
void lfds700_queue_cleanup( struct lfds700_queue_state *qs, void (*element_cleanup_callback)(struct lfds700_queue_state *qs, enum lfds700_misc_flag dummy_element_flag) );
Parameters
struct lfds700_queue_state *qs
- A pointer to an initialized struct lfds700_queue_state.
void (*element_cleanup_callback)(struct lfds700_queue_state *qs, enum lfds700_misc_flag dummy_element_flag)
- A callback function which is called with every element present in the queue at the time of cleanup. This argument can be NULL. The queue always contains one dummy element, which does not contain a valid key or value. The dummy_element_flag argument is set to LFDS700_MISC_RAISED when this element is provided to the callback.
Notes
This function cleans up an initialized queue. If element_cleanup_callback is not NULL, it is called once for each element in the queue.
After lfds700_queue_cleanup is complete, the user is safe to deallocate the store used for the queue state.
Example
Coming soon. No, really! (Written 29th Dec 2015).