function lfds710_queue_umm_cleanup

From liblfds.org
Jump to: navigation, search

Source Files

└───liblfds710
    ├───inc
    │   └───liblfds710
    │           lfds710_queue_umm.h
    └───src
        └───lfds710_queue
                lfds710_queue_umm_cleanup.c

Enums

enum lfds710_misc_flag
{
  LFDS710_MISC_FLAG_LOWERED,
  LFDS710_MISC_FLAG_RAISED
};

Opaque Structures

struct lfds710_queue_umm_element;
struct lfds710_queue_umm_state;

Prototype

void lfds710_queue_cleanup( struct lfds710_queue_umm_state *qumms,
                            void (*element_cleanup_callback)(struct lfds710_queue_umm_state *qumms,
                                                             struct lfds710_queue_umm_element *qumme,
                                                             enum lfds710_misc_flag dummy_element_flag) );

Parameters

struct lfds710_queue_state *qumms

A pointer to an initialized struct lfds710_queue_umm_state.

void (*element_cleanup_callback)(struct lfds710_queue_umm_state *qumms, struct lfds710_queue_umm_element *qumme, enum lfds710_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 LFDS710_MISC_FLAG_RAISED when this element is provided to the callback, and LFDS710_MISC_FLAG_LOWERED otherwise.

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 lfds710_queue_umm_cleanup is complete, the user is safe to deallocate the store used for the queue state.

See Also