picotm
0.10.0
|
Provides non-transactional state and entries for transactional queues. More...
#include <stddef.h>
#include <picotm/compiler.h>
#include <picotm/config/picotm-txlib-config.h>
#include <picotm/picotm-lib-rwlock.h>
Data Structures | |
struct | txqueue_entry |
Represents an entry in a transaction-safe queue. More... | |
struct | txqueue_state |
The global state of transaction-safe queue. More... | |
Macros | |
#define | __TXQUEUE_ENTRY_INITIALIZER(_value) |
Initializer macro for struct txqueue_entry . More... | |
#define | TXQUEUE_ENTRY_INITIALIZER |
Initializer macro for struct txqueue_entry . | |
#define | TXQUEUE_STATE_INITIALIZER(queue_state) |
Initializer macro for struct txqueue_state . | |
Functions | |
PICOTM_NOTHROW void | txqueue_entry_init (struct txqueue_entry *self) |
Initializes an entry of a transactional queue. More... | |
PICOTM_NOTHROW void | txqueue_entry_uninit (struct txqueue_entry *self) |
Cleans up an entry of a transactional queue. More... | |
PICOTM_NOTHROW void | txqueue_state_clear_and_uninit_entries (struct txqueue_state *self, void(*uninit)(struct txqueue_entry *, void *), void *data) |
Removes all entries from a queue state and runs a cleanup function on each. More... | |
PICOTM_NOTHROW void | txqueue_state_init (struct txqueue_state *self) |
Initializes queue state. More... | |
PICOTM_NOTHROW void | txqueue_state_uninit (struct txqueue_state *self) |
Cleans up queue state. More... | |
#define __TXQUEUE_ENTRY_INITIALIZER | ( | _value | ) |
PICOTM_NOTHROW void txqueue_entry_init | ( | struct txqueue_entry * | self | ) |
self | The queue entry to initialize. |
PICOTM_NOTHROW void txqueue_entry_uninit | ( | struct txqueue_entry * | self | ) |
self | The queue entry to clean up. |
PICOTM_NOTHROW void txqueue_state_clear_and_uninit_entries | ( | struct txqueue_state * | self, |
void(*)(struct txqueue_entry *, void *) | uninit, | ||
void * | data | ||
) |
self | The queue state to clear. |
uninit | The queue-entry clean-up function. |
data | The clean-up function's data parameter. |
PICOTM_NOTHROW void txqueue_state_init | ( | struct txqueue_state * | self | ) |
self | The queue state to initialize. |
PICOTM_NOTHROW void txqueue_state_uninit | ( | struct txqueue_state * | self | ) |
self | The queue state to clean up. |