Provides non-transactional state and entries for transactional stacks. More...
#include <picotm/compiler.h>
#include <picotm/config/picotm-txlib-config.h>
#include <picotm/picotm-lib-rwlock.h>
#include <stddef.h>
Data Structures | |
struct | txstack_entry |
Represents an entry in a transaction-safe stack. More... | |
struct | txstack_state |
The global state of transaction-safe stack. More... | |
Macros | |
#define | __TXSTACK_ENTRY_INITIALIZER(_value) |
Initializer macro for struct txstack_entry . More... | |
#define | TXSTACK_ENTRY_INITIALIZER |
Initializer macro for struct txstack_entry . | |
#define | TXSTACK_STATE_INITIALIZER(stack_state) |
Initializer macro for struct txstack_state . | |
Functions | |
PICOTM_NOTHROW void | txstack_entry_init (struct txstack_entry *self) |
Initializes an entry of a transactional stack. More... | |
PICOTM_NOTHROW void | txstack_entry_uninit (struct txstack_entry *self) |
Cleans up an entry of a transactional stack. More... | |
PICOTM_NOTHROW void | txstack_state_clear_and_uninit_entries (struct txstack_state *self, void(*uninit)(struct txstack_entry *, void *), void *data) |
Removes all entries from a stack state and runs a cleanup function on each. More... | |
PICOTM_NOTHROW void | txstack_state_init (struct txstack_state *self) |
Initializes stack state. More... | |
PICOTM_NOTHROW void | txstack_state_uninit (struct txstack_state *self) |
Cleans up stack state. More... | |
#define __TXSTACK_ENTRY_INITIALIZER | ( | _value | ) |
PICOTM_NOTHROW void txstack_entry_init | ( | struct txstack_entry * | self | ) |
self | The stack entry to initialize. |
PICOTM_NOTHROW void txstack_entry_uninit | ( | struct txstack_entry * | self | ) |
self | The stack entry to clean up. |
PICOTM_NOTHROW void txstack_state_clear_and_uninit_entries | ( | struct txstack_state * | self, |
void(*)(struct txstack_entry *, void *) | uninit, | ||
void * | data | ||
) |
self | The stack state to clear. |
uninit | The stack-entry clean-up function. |
data | The clean-up function's data parameter. |
PICOTM_NOTHROW void txstack_state_init | ( | struct txstack_state * | self | ) |
self | The stack state to initialize. |
PICOTM_NOTHROW void txstack_state_uninit | ( | struct txstack_state * | self | ) |
self | The stack state to clean up. |