picotm
0.9.0
|
Provides non-transactional state and entries for transactional lists. More...
#include <picotm/compiler.h>
#include <picotm/config/picotm-txlib-config.h>
#include <picotm/picotm-lib-rwlock.h>
Data Structures | |
struct | txlist_entry |
Represents an entry in a transaction-safe list. More... | |
struct | txlist_state |
The global state of transaction-safe list. More... | |
Macros | |
#define | __TXLIST_ENTRY_INITIALIZER(_value) |
Initializer macro for struct txlist_entry . More... | |
#define | TXLIST_ENTRY_INITIALIZER |
Initializer macro for struct txlist_entry . | |
#define | TXLIST_STATE_INITIALIZER(list_state) |
Initializer macro for struct txlist_state . | |
Functions | |
PICOTM_NOTHROW void | txlist_entry_init (struct txlist_entry *self) |
Initializes an entry of a transactional list. More... | |
PICOTM_NOTHROW struct txlist_entry * | txlist_entry_next_tx (const struct txlist_entry *self) |
Returns the next list entry. More... | |
PICOTM_NOTHROW struct txlist_entry * | txlist_entry_prev_tx (const struct txlist_entry *self) |
Returns the previous list entry. More... | |
PICOTM_NOTHROW void | txlist_entry_uninit (struct txlist_entry *self) |
Cleans up an entry of a transactional list. More... | |
PICOTM_NOTHROW void | txlist_state_clear_and_uninit_entries (struct txlist_state *self, void(*uninit)(struct txlist_entry *, void *), void *data) |
Removes all entries from a list state and runs a cleanup function on each. More... | |
PICOTM_NOTHROW void | txlist_state_init (struct txlist_state *self) |
Initializes list state. More... | |
PICOTM_NOTHROW void | txlist_state_uninit (struct txlist_state *self) |
Cleans up list state. More... | |
#define __TXLIST_ENTRY_INITIALIZER | ( | _value | ) |
PICOTM_NOTHROW void txlist_entry_init | ( | struct txlist_entry * | self | ) |
self | The list entry to initialize. |
PICOTM_NOTHROW struct txlist_entry* txlist_entry_next_tx | ( | const struct txlist_entry * | self | ) |
self | The current list entry. |
PICOTM_NOTHROW struct txlist_entry* txlist_entry_prev_tx | ( | const struct txlist_entry * | self | ) |
self | The current list entry. |
PICOTM_NOTHROW void txlist_entry_uninit | ( | struct txlist_entry * | self | ) |
self | The list entry to clean up. |
PICOTM_NOTHROW void txlist_state_clear_and_uninit_entries | ( | struct txlist_state * | self, |
void(*)(struct txlist_entry *, void *) | uninit, | ||
void * | data | ||
) |
self | The list state to clear. |
uninit | The list-entry clean-up function. |
data | The clean-up function's data parameter. |
PICOTM_NOTHROW void txlist_state_init | ( | struct txlist_state * | self | ) |
self | The list state to initialize. |
PICOTM_NOTHROW void txlist_state_uninit | ( | struct txlist_state * | self | ) |
self | The list state to clean up. |