function lfds710_stack_cleanup

From liblfds.org
Revision as of 18:50, 30 May 2016 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

└───liblfds710
    ├───inc
    │   └───liblfds710
    │           lfds710_stack.h
    └───src
        └───lfds710_stack
                lfds710_stack_cleanup.c

Opaque Structures

struct lfds710_stack_element;
struct lfds710_stack_state;

Prototype

void lfds710_stack_cleanup( struct lfds710_stack_state *ss,
                            void (*element_cleanup_callback)(struct lfds710_stack_state *ss, struct lfds710_stack_element *se) );

Parameters

struct lfds710_stack_state *ss

A pointer to an initialized struct lfds710_stack_state.

void (*element_cleanup_callback)(struct lfds710_stack_state *ss, struct lfds710_stack_element *se)

A callback function which is called with every element present in the stack 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 stack elements valid for the current logical core and to iterate over the stack and pass each element to the callback function.

The user can in the callback function use the LFDS710_STACK_GET_USER_STATE_FROM_STATE macro on the stack state to get hold of the user state provided when the stack was initialized.

See Also