function lfds711_queue_umm_cleanup

From liblfds.org
Jump to navigation Jump to search

Source Files

└───liblfds711
    ├───inc
    │   └───liblfds711
    │           lfds711_queue_umm.h
    └───src
        └───lfds711_queue
                lfds711_queue_umm_cleanup.c

Enums

enum lfds711_misc_flag
{
  LFDS711_MISC_FLAG_LOWERED,
  LFDS711_MISC_FLAG_RAISED
};

Opaque Structures

struct lfds711_queue_umm_element;
struct lfds711_queue_umm_state;

Prototype

void lfds711_queue_cleanup( struct lfds711_queue_umm_state *qumms,
                            void (*element_cleanup_callback)(struct lfds711_queue_umm_state *qumms,
                                                             struct lfds711_queue_umm_element *qumme,
                                                             enum lfds711_misc_flag dummy_element_flag) );

Parameters

struct lfds711_queue_state *qumms

A pointer to an initialized struct lfds711_queue_umm_state.

void (*element_cleanup_callback)(struct lfds711_queue_umm_state *qumms, struct lfds711_queue_umm_element *qumme, enum lfds711_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 LFDS711_MISC_FLAG_RAISED when this element is provided to the callback, and LFDS711_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 lfds711_queue_umm_cleanup is complete, the user is safe to deallocate the store used for the queue state.

See Also