Files | Data Structures | Macros | Typedefs | Functions
The Transactional Data-Structures Module

The txlib module provides data structures that are safe to use from within transactions and cooperate with the transaction manager. Currently supported are lists, queues, multisets and stacks. More...

Files

file  picotm-txlib.h
 Provides transactional data structures.
 
file  picotm-txlist-state.h
 Provides non-transactional state and entries for transactional lists.
 
file  picotm-txlist.h
 Provides transactional lists.
 
file  picotm-txmultiset-state.h
 Provides non-transactional state and entries for transactional multisets.
 
file  picotm-txmultiset.h
 Provides transactional multisets.
 
file  picotm-txqueue-state.h
 Provides non-transactional state and entries for transactional queues.
 
file  picotm-txqueue.h
 Provides transactional queues.
 
file  picotm-txstack-state.h
 Provides non-transactional state and entries for transactional stacks.
 
file  picotm-txstack.h
 Provides transactional stacks.
 

Data Structures

struct  txlist
 A handle for operating on transaction-safe lists. More...
 
struct  txlist_entry
 Represents an entry in a transaction-safe list. More...
 
struct  txlist_state
 The global state of transaction-safe list. More...
 
struct  txmultiset
 A handle for operating on transaction-safe multisets. More...
 
struct  txmultiset_entry
 Represents an entry in a transaction-safe multiset. More...
 
struct  txmultiset_state
 The global state of transaction-safe multiset. More...
 
struct  txqueue
 A handle for operating on transaction-safe queues. More...
 
struct  txqueue_entry
 Represents an entry in a transaction-safe queue. More...
 
struct  txqueue_state
 The global state of transaction-safe queue. More...
 
struct  txstack
 A handle for operating on transaction-safe stacks. More...
 
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 TXLIST_ENTRY_INITIALIZER
 Initializer macro for struct txlist_entry.
 
#define TXLIST_STATE_INITIALIZER(list_state)
 Initializer macro for struct txlist_state.
 
#define TXMULTISET_ENTRY_INITIALIZER
 Initializer macro for struct txmultiset_entry.
 
#define TXMULTISET_STATE_INITIALIZER(_multiset_state, _key, _compare)
 Initializer macro for struct txmultiset_state.
 
#define TXQUEUE_ENTRY_INITIALIZER
 Initializer macro for struct txqueue_entry.
 
#define TXQUEUE_STATE_INITIALIZER(queue_state)
 Initializer macro for struct txqueue_state.
 
#define TXSTACK_ENTRY_INITIALIZER
 Initializer macro for struct txstack_entry.
 
#define TXSTACK_STATE_INITIALIZER(stack_state)
 Initializer macro for struct txstack_state.
 

Typedefs

typedef int(* txmultiset_compare_function) (const void *lhs, const void *rhs)
 Key-compare function for two multiset-entry keys. More...
 
typedef const void *(* txmultiset_key_function) (struct txmultiset_entry *entry)
 Generates a compare key for a multiset entry. More...
 

Functions

PICOTM_NOTHROW struct txlist_entrytxlist_back_tx (struct txlist *self)
 Returns the back-end entry of a transactional list without removing it. More...
 
PICOTM_NOTHROW struct txlist_entrytxlist_begin_tx (struct txlist *self)
 Returns the first entry of a transactional list. More...
 
PICOTM_NOTHROW void txlist_clear_tx (struct txlist *self)
 Removes all entries from a transactional list. More...
 
PICOTM_NOTHROW bool txlist_empty_tx (struct txlist *self)
 Tests a transactional list for emptiness. More...
 
PICOTM_NOTHROW struct txlist_entrytxlist_end_tx (struct txlist *self)
 Returns the terminator of a transactional list. More...
 
PICOTM_NOTHROW void txlist_entry_init (struct txlist_entry *self)
 Initializes an entry of a transactional list. More...
 
PICOTM_NOTHROW void txlist_entry_init_tm (struct txlist_entry *self)
 Initializes an entry of a transactional list from within a transaction. More...
 
PICOTM_NOTHROW struct txlist_entrytxlist_entry_next_tx (const struct txlist_entry *self)
 Returns the next list entry. More...
 
PICOTM_NOTHROW struct txlist_entrytxlist_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_entry_uninit_tm (struct txlist_entry *self)
 Cleans up an entry of a transactional list from within a transaction. More...
 
PICOTM_NOTHROW void txlist_erase_tx (struct txlist *self, struct txlist_entry *entry)
 Removes an entry from a transactional list. More...
 
PICOTM_NOTHROW struct txlist_entrytxlist_front_tx (struct txlist *self)
 Returns the front-end entry of a transactional list without removing it. More...
 
PICOTM_NOTHROW void txlist_insert_tx (struct txlist *self, struct txlist_entry *entry, struct txlist_entry *position)
 Inserts an entry into a transactional list. More...
 
PICOTM_NOTHROW struct txlisttxlist_of_state_tx (struct txlist_state *list_state)
 Creates a transactional list for a list state. More...
 
PICOTM_NOTHROW void txlist_pop_back_tx (struct txlist *self)
 Removes the last entry of a transactional list. More...
 
PICOTM_NOTHROW void txlist_pop_front_tx (struct txlist *self)
 Removes the first entry of a transactional list. More...
 
PICOTM_NOTHROW void txlist_push_back_tx (struct txlist *self, struct txlist_entry *entry)
 Inserts an entry at the end of a transactional list. More...
 
PICOTM_NOTHROW void txlist_push_front_tx (struct txlist *self, struct txlist_entry *entry)
 Inserts an entry at the beginning of a transactional list. More...
 
PICOTM_NOTHROW size_t txlist_size_tx (struct txlist *self)
 Returns the number of entries in 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...
 
PICOTM_NOTHROW struct txmultiset_entrytxmultiset_begin_tx (struct txmultiset *self)
 Returns the first entry of a transactional multiset. More...
 
PICOTM_NOTHROW void txmultiset_clear_tx (struct txmultiset *self)
 Removes all entries from a transactional multiset. More...
 
PICOTM_NOTHROW size_t txmultiset_count_tx (struct txmultiset *self, const void *key)
 Returns the number of entries with a specfic key in a transactional multiset. More...
 
PICOTM_NOTHROW bool txmultiset_empty_tx (struct txmultiset *self)
 Tests a transactional multiset for emptiness. More...
 
PICOTM_NOTHROW struct txmultiset_entrytxmultiset_end_tx (struct txmultiset *self)
 Returns the terminator of a transactional multiset. More...
 
PICOTM_NOTHROW void txmultiset_entry_init (struct txmultiset_entry *self)
 Initializes an entry of a transactional multiset. More...
 
PICOTM_NOTHROW void txmultiset_entry_init_tm (struct txmultiset_entry *self)
 Initializes an entry of a transactional multiset from within a transaction. More...
 
PICOTM_NOTHROW struct txmultiset_entrytxmultiset_entry_next_tx (const struct txmultiset_entry *self)
 Returns the next multiset entry. More...
 
PICOTM_NOTHROW struct txmultiset_entrytxmultiset_entry_prev_tx (const struct txmultiset_entry *self)
 Returns the previous multiset entry. More...
 
PICOTM_NOTHROW void txmultiset_entry_uninit (struct txmultiset_entry *self)
 Cleans up an entry of a transactional multiset. More...
 
PICOTM_NOTHROW void txmultiset_entry_uninit_tm (struct txmultiset_entry *self)
 Cleans up an entry of a transactional multiset from within a transaction. More...
 
PICOTM_NOTHROW void txmultiset_erase_tx (struct txmultiset *self, struct txmultiset_entry *entry)
 Removes an entry from a transactional multiset. More...
 
PICOTM_NOTHROW struct txmultiset_entrytxmultiset_find_tx (struct txmultiset *self, const void *key)
 Finds an entry with a specific key in a transactional multiset. More...
 
PICOTM_NOTHROW void txmultiset_insert_tx (struct txmultiset *self, struct txmultiset_entry *entry)
 Inserts an entry into a transactional multiset. More...
 
PICOTM_NOTHROW struct txmultiset_entrytxmultiset_lower_bound_tx (struct txmultiset *self, const void *key)
 Returns a transactional multiset's the first entry with a specific key. More...
 
PICOTM_NOTHROW struct txmultisettxmultiset_of_state_tx (struct txmultiset_state *multiset_state)
 Creates a transactional multiset for a multiset state. More...
 
PICOTM_NOTHROW size_t txmultiset_size_tx (struct txmultiset *self)
 Returns the number of entries in a transactional multiset. More...
 
PICOTM_NOTHROW void txmultiset_state_clear_and_uninit_entries (struct txmultiset_state *self, void(*uninit)(struct txmultiset_entry *, void *), void *data)
 Removes all entries from a multiset state and runs a cleanup function on each. More...
 
PICOTM_NOTHROW void txmultiset_state_init (struct txmultiset_state *self, txmultiset_key_function key, txmultiset_compare_function compare)
 Initializes multiset state. More...
 
PICOTM_NOTHROW void txmultiset_state_uninit (struct txmultiset_state *self)
 Cleans up multiset state. More...
 
PICOTM_NOTHROW struct txmultiset_entrytxmultiset_upper_bound_tx (struct txmultiset *self, const void *key)
 Returns a transactional multiset's first entry with a key larger than a specific key. More...
 
PICOTM_NOTHROW struct txqueue_entrytxqueue_back_tx (struct txqueue *self)
 Retruns the back-end entry of a transactional queue. More...
 
PICOTM_NOTHROW bool txqueue_empty_tx (struct txqueue *self)
 Tests a transactional queue for emptiness. More...
 
PICOTM_NOTHROW void txqueue_entry_init (struct txqueue_entry *self)
 Initializes an entry of a transactional queue. More...
 
PICOTM_NOTHROW void txqueue_entry_init_tm (struct txqueue_entry *self)
 Initializes an entry of a transactional queue from within a transaction. More...
 
PICOTM_NOTHROW void txqueue_entry_uninit (struct txqueue_entry *self)
 Cleans up an entry of a transactional queue. More...
 
PICOTM_NOTHROW void txqueue_entry_uninit_tm (struct txqueue_entry *self)
 Cleans up an entry of a transactional queue. More...
 
PICOTM_NOTHROW struct txqueue_entrytxqueue_front_tx (struct txqueue *self)
 Returns the front-end entry of a transactional queue. More...
 
PICOTM_NOTHROW struct txqueuetxqueue_of_state_tx (struct txqueue_state *queue_state)
 Creates a transactional queue for a queue state. More...
 
PICOTM_NOTHROW void txqueue_pop_tx (struct txqueue *self)
 Removes the last entry of a transactional queue. More...
 
PICOTM_NOTHROW void txqueue_push_tx (struct txqueue *self, struct txqueue_entry *entry)
 Inserts an entry at the front of a transactional queue. More...
 
PICOTM_NOTHROW size_t txqueue_size_tx (struct txqueue *self)
 Returns the number of entries in 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...
 
PICOTM_NOTHROW bool txstack_empty_tx (struct txstack *self)
 Tests a transactional stack for emptiness. More...
 
PICOTM_NOTHROW void txstack_entry_init (struct txstack_entry *self)
 Initializes an entry of a transactional stack. More...
 
PICOTM_NOTHROW void txstack_entry_init_tm (struct txstack_entry *self)
 Initializes an entry of a transactional stack from within a transaction. More...
 
PICOTM_NOTHROW void txstack_entry_uninit (struct txstack_entry *self)
 Cleans up an entry of a transactional stack. More...
 
PICOTM_NOTHROW void txstack_entry_uninit_tm (struct txstack_entry *self)
 Cleans up an entry of a transactional stack from within a transaction. More...
 
PICOTM_NOTHROW struct txstacktxstack_of_state_tx (struct txstack_state *stack_state)
 Creates a transactional stack for a stack state. More...
 
PICOTM_NOTHROW void txstack_pop_tx (struct txstack *self)
 Removes the top-most entry of a transactional stack. More...
 
PICOTM_NOTHROW void txstack_push_tx (struct txstack *self, struct txstack_entry *entry)
 Inserts an entry at the top of a transactional stack. More...
 
PICOTM_NOTHROW size_t txstack_size_tx (struct txstack *self)
 Returns the number of entries on 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...
 
PICOTM_NOTHROW struct txstack_entrytxstack_top_tx (struct txstack *self)
 Returns the top-most entry of a transactional stack. More...
 

Detailed Description

Txlib, the transactional data-structures module, provides data structures that are safe and efficient to use from within transactions. Each data strcuture's implementation cooperates with the transaction manager to provide concurrency control and error recovery.

As a quick example, the following code removes an entry from a source list and appends it to a destination list. The change becomes globally visible during the transaction's successful commit. Concurrent, conflicting access to the list data strcutures is detected and resolved automatically. If the transaction has to roll back at any point, the invoked operation are reverted and the lists return to their previous state.

struct txlist_state src_list_state = TXLIST_STATE_INITIALIZER(src_list_state);
struct txlist_state dst_list_state = TXLIST_STATE_INITIALIZER(dst_list_state);
// init code
struct txlist* src_list = txlist_of_state_tx(&src_list_state);
struct txlist* dst_list = txlist_of_state_tx(&dst_list_state);
// The list state for 'src_list' already contains the entry.
txlist_erase_tx(src_list, &list_entry);
txlist_push_back_tx(dst_list, &item->list_entry);
// ... more transactional code ...

For more information, refer to the documentation of the specific data structure.

  1. Transactional Lists
    The transactional list provides a transaction-safe implementation of a double-linked list. Efficient insert and remove operations are supported anywhere within the list.
  2. Transactional Queues
    The transactional queue provides a transaction-safe implementation of a single-ended FIFO queue. Efficient insert operations are supported on one end, efficient remove operations are supported on the opposite end.
  3. Transactional Multisets
    The transactional multiset provides a transaction-safe implementation of a multiset. Multisets are sorted sets of elements. Duplicate entries are supported.
  4. Transactional Stacks
    The transactional stack provides a transaction-safe implementation of a single-ended LIFO stack. Efficient insert and remove operations are supported on the same end.

Typedef Documentation

◆ txmultiset_compare_function

typedef int(* txmultiset_compare_function) (const void *lhs, const void *rhs)
Parameters
lhsThe left-hand-side key.
rhsThe right-hand-side key.
Returns
A value less than, equal to, or greater than 0 if lhs is less than, equal to, or greater than rhs.

◆ txmultiset_key_function

typedef const void*(* txmultiset_key_function) (struct txmultiset_entry *entry)
Parameters
Themultiset entry.
Returns
A comparable key for the multiset entry.

Function Documentation

◆ txlist_back_tx()

PICOTM_NOTHROW struct txlist_entry* txlist_back_tx ( struct txlist self)
Parameters
selfThe transactional list.
Returns
The front entry.

◆ txlist_begin_tx()

PICOTM_NOTHROW struct txlist_entry* txlist_begin_tx ( struct txlist self)
Parameters
selfThe transactional list.
Returns
The transactional list's first entry.

◆ txlist_clear_tx()

PICOTM_NOTHROW void txlist_clear_tx ( struct txlist self)
Parameters
selfThe transactional list.

◆ txlist_empty_tx()

PICOTM_NOTHROW bool txlist_empty_tx ( struct txlist self)
Parameters
selfThe transactional list.
Returns
True if the list is empty, false otherwise.

◆ txlist_end_tx()

PICOTM_NOTHROW struct txlist_entry* txlist_end_tx ( struct txlist self)
Parameters
selfThe transactional list.
Returns
The transactional list's terminator entry.

◆ txlist_entry_init()

PICOTM_NOTHROW void txlist_entry_init ( struct txlist_entry self)
Parameters
selfThe list entry to initialize.

◆ txlist_entry_init_tm()

PICOTM_NOTHROW void txlist_entry_init_tm ( struct txlist_entry self)
Parameters
selfThe list entry to initialize.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txlist_entry_next_tx()

PICOTM_NOTHROW struct txlist_entry* txlist_entry_next_tx ( const struct txlist_entry self)
Parameters
selfThe current list entry.
Returns
The next list entry.

◆ txlist_entry_prev_tx()

PICOTM_NOTHROW struct txlist_entry* txlist_entry_prev_tx ( const struct txlist_entry self)
Parameters
selfThe current list entry.
Returns
The previous list entry.

◆ txlist_entry_uninit()

PICOTM_NOTHROW void txlist_entry_uninit ( struct txlist_entry self)
Parameters
selfThe list entry to clean up.

◆ txlist_entry_uninit_tm()

PICOTM_NOTHROW void txlist_entry_uninit_tm ( struct txlist_entry self)
Parameters
selfThe list entry to clean up.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txlist_erase_tx()

PICOTM_NOTHROW void txlist_erase_tx ( struct txlist self,
struct txlist_entry entry 
)
Parameters
selfThe transactional list.
entryThe list entry to remove.

◆ txlist_front_tx()

PICOTM_NOTHROW struct txlist_entry* txlist_front_tx ( struct txlist self)
Parameters
selfThe transactional list.
Returns
The front entry.

◆ txlist_insert_tx()

PICOTM_NOTHROW void txlist_insert_tx ( struct txlist self,
struct txlist_entry entry,
struct txlist_entry position 
)
Parameters
selfThe transactional list.
entryThe list entry to insert.
positionThe list entry before which the new entry is inserted.

◆ txlist_of_state_tx()

PICOTM_NOTHROW struct txlist* txlist_of_state_tx ( struct txlist_state list_state)
Parameters
list_stateThe list state.
Returns
A transactional list for the list state.

◆ txlist_pop_back_tx()

PICOTM_NOTHROW void txlist_pop_back_tx ( struct txlist self)
Parameters
selfThe transactional list.

◆ txlist_pop_front_tx()

PICOTM_NOTHROW void txlist_pop_front_tx ( struct txlist self)
Parameters
selfThe transactional list.

◆ txlist_push_back_tx()

PICOTM_NOTHROW void txlist_push_back_tx ( struct txlist self,
struct txlist_entry entry 
)
Parameters
selfThe transactional list.
entryThe list entry to insert.

◆ txlist_push_front_tx()

PICOTM_NOTHROW void txlist_push_front_tx ( struct txlist self,
struct txlist_entry entry 
)
Parameters
selfThe transactional list.
entryThe list entry to insert.

◆ txlist_size_tx()

PICOTM_NOTHROW size_t txlist_size_tx ( struct txlist self)
Parameters
selfThe transactional list.
Returns
The number of entries in the transactional list.

◆ txlist_state_clear_and_uninit_entries()

PICOTM_NOTHROW void txlist_state_clear_and_uninit_entries ( struct txlist_state self,
void(*)(struct txlist_entry *, void *)  uninit,
void *  data 
)
Parameters
selfThe list state to clear.
uninitThe list-entry clean-up function.
dataThe clean-up function's data parameter.

◆ txlist_state_init()

PICOTM_NOTHROW void txlist_state_init ( struct txlist_state self)
Parameters
selfThe list state to initialize.

◆ txlist_state_uninit()

PICOTM_NOTHROW void txlist_state_uninit ( struct txlist_state self)
Parameters
selfThe list state to clean up.

◆ txmultiset_begin_tx()

PICOTM_NOTHROW struct txmultiset_entry* txmultiset_begin_tx ( struct txmultiset self)
Parameters
selfThe transactional multiset.
Returns
The transactional multiset's first entry.

◆ txmultiset_clear_tx()

PICOTM_NOTHROW void txmultiset_clear_tx ( struct txmultiset self)
Parameters
selfThe transactional multiset.

◆ txmultiset_count_tx()

PICOTM_NOTHROW size_t txmultiset_count_tx ( struct txmultiset self,
const void *  key 
)
Parameters
selfThe transactional multiset.
keyThe multiset entry's key.
Returns
The number of entries with the given key.

◆ txmultiset_empty_tx()

PICOTM_NOTHROW bool txmultiset_empty_tx ( struct txmultiset self)
Parameters
selfThe transactional multiset.
Returns
True if the multiset is empty, false otherwise.

◆ txmultiset_end_tx()

PICOTM_NOTHROW struct txmultiset_entry* txmultiset_end_tx ( struct txmultiset self)
Parameters
selfThe transactional multiset.
Returns
The transactional multiset's terminator entry.

◆ txmultiset_entry_init()

PICOTM_NOTHROW void txmultiset_entry_init ( struct txmultiset_entry self)
Parameters
selfThe multiset entry to initialize.

◆ txmultiset_entry_init_tm()

PICOTM_NOTHROW void txmultiset_entry_init_tm ( struct txmultiset_entry self)
Parameters
selfThe multiset entry to initialize.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txmultiset_entry_next_tx()

PICOTM_NOTHROW struct txmultiset_entry* txmultiset_entry_next_tx ( const struct txmultiset_entry self)
Parameters
selfThe current multiset entry.
Returns
The next multiset entry.

◆ txmultiset_entry_prev_tx()

PICOTM_NOTHROW struct txmultiset_entry* txmultiset_entry_prev_tx ( const struct txmultiset_entry self)
Parameters
selfThe current multiset entry.
Returns
The previous multiset entry.

◆ txmultiset_entry_uninit()

PICOTM_NOTHROW void txmultiset_entry_uninit ( struct txmultiset_entry self)
Parameters
selfThe multiset entry to clean up.

◆ txmultiset_entry_uninit_tm()

PICOTM_NOTHROW void txmultiset_entry_uninit_tm ( struct txmultiset_entry self)
Parameters
selfThe multiset entry to clean up.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txmultiset_erase_tx()

PICOTM_NOTHROW void txmultiset_erase_tx ( struct txmultiset self,
struct txmultiset_entry entry 
)
Parameters
selfThe transactional multiset.
entryThe multiset entry to remove.

◆ txmultiset_find_tx()

PICOTM_NOTHROW struct txmultiset_entry* txmultiset_find_tx ( struct txmultiset self,
const void *  key 
)
Parameters
selfThe transactional multiset.
keyThe multiset entry's key.
Returns
An entry with the given key on success, or the terminator entry otherwise.

◆ txmultiset_insert_tx()

PICOTM_NOTHROW void txmultiset_insert_tx ( struct txmultiset self,
struct txmultiset_entry entry 
)
Parameters
selfThe transactional multiset.
entryThe multiset entry to insert.

◆ txmultiset_lower_bound_tx()

PICOTM_NOTHROW struct txmultiset_entry* txmultiset_lower_bound_tx ( struct txmultiset self,
const void *  key 
)
Parameters
selfThe transactional multiset.
keyThe multiset entry's key.
Returns
The first entry with the given key on success, or the terminator entry otherwise.

◆ txmultiset_of_state_tx()

PICOTM_NOTHROW struct txmultiset* txmultiset_of_state_tx ( struct txmultiset_state multiset_state)
Parameters
multiset_stateThe multiset state.
Returns
A transactional multiset for the multiset state.

◆ txmultiset_size_tx()

PICOTM_NOTHROW size_t txmultiset_size_tx ( struct txmultiset self)
Parameters
selfThe transactional multiset.
Returns
The number of entries in the transactional multiset.

◆ txmultiset_state_clear_and_uninit_entries()

PICOTM_NOTHROW void txmultiset_state_clear_and_uninit_entries ( struct txmultiset_state self,
void(*)(struct txmultiset_entry *, void *)  uninit,
void *  data 
)
Parameters
selfThe multiset state to clear.
uninitThe multiset-entry clean-up function.
dataThe clean-up function's data parameter.

◆ txmultiset_state_init()

PICOTM_NOTHROW void txmultiset_state_init ( struct txmultiset_state self,
txmultiset_key_function  key,
txmultiset_compare_function  compare 
)
Parameters
selfThe multiset state to initialize.
keyThe key generator function for the multiset's entries.
compareThe key-compare function.

◆ txmultiset_state_uninit()

PICOTM_NOTHROW void txmultiset_state_uninit ( struct txmultiset_state self)
Parameters
selfThe multiset state to clean up.

◆ txmultiset_upper_bound_tx()

PICOTM_NOTHROW struct txmultiset_entry* txmultiset_upper_bound_tx ( struct txmultiset self,
const void *  key 
)
Parameters
selfThe transactional multiset.
keyThe multiset entry's key.
Returns
The first entry with a key that is larger than the given key on success, or the terminator entry otherwise.

◆ txqueue_back_tx()

PICOTM_NOTHROW struct txqueue_entry* txqueue_back_tx ( struct txqueue self)
Parameters
selfThe transactional queue.
Returns
The entry at the transactional queue's back end.

◆ txqueue_empty_tx()

PICOTM_NOTHROW bool txqueue_empty_tx ( struct txqueue self)
Parameters
selfThe transactional queue.
Returns
True if the queue is empty, false otherwise.

◆ txqueue_entry_init()

PICOTM_NOTHROW void txqueue_entry_init ( struct txqueue_entry self)
Parameters
selfThe queue entry to initialize.

◆ txqueue_entry_init_tm()

PICOTM_NOTHROW void txqueue_entry_init_tm ( struct txqueue_entry self)
Parameters
selfThe queue entry to initialize.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txqueue_entry_uninit()

PICOTM_NOTHROW void txqueue_entry_uninit ( struct txqueue_entry self)
Parameters
selfThe queue entry to clean up.

◆ txqueue_entry_uninit_tm()

PICOTM_NOTHROW void txqueue_entry_uninit_tm ( struct txqueue_entry self)
Parameters
selfThe queue entry to clean up.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txqueue_front_tx()

PICOTM_NOTHROW struct txqueue_entry* txqueue_front_tx ( struct txqueue self)
Parameters
selfThe transactional queue.
Returns
The entry at the transactional queue's front end.

◆ txqueue_of_state_tx()

PICOTM_NOTHROW struct txqueue* txqueue_of_state_tx ( struct txqueue_state queue_state)
Parameters
queue_stateThe queue state.
Returns
A transactional queue for the queue state.

◆ txqueue_pop_tx()

PICOTM_NOTHROW void txqueue_pop_tx ( struct txqueue self)
Parameters
selfThe transactional queue.

◆ txqueue_push_tx()

PICOTM_NOTHROW void txqueue_push_tx ( struct txqueue self,
struct txqueue_entry entry 
)
Parameters
selfThe transactional queue.
entryThe queue entry to insert.

◆ txqueue_size_tx()

PICOTM_NOTHROW size_t txqueue_size_tx ( struct txqueue self)
Parameters
selfThe transactional queue.
Returns
The number of entries in the transactional queue.

◆ txqueue_state_clear_and_uninit_entries()

PICOTM_NOTHROW void txqueue_state_clear_and_uninit_entries ( struct txqueue_state self,
void(*)(struct txqueue_entry *, void *)  uninit,
void *  data 
)
Parameters
selfThe queue state to clear.
uninitThe queue-entry clean-up function.
dataThe clean-up function's data parameter.

◆ txqueue_state_init()

PICOTM_NOTHROW void txqueue_state_init ( struct txqueue_state self)
Parameters
selfThe queue state to initialize.

◆ txqueue_state_uninit()

PICOTM_NOTHROW void txqueue_state_uninit ( struct txqueue_state self)
Parameters
selfThe queue state to clean up.

◆ txstack_empty_tx()

PICOTM_NOTHROW bool txstack_empty_tx ( struct txstack self)
Parameters
selfThe transactional stack.
Returns
True if the stack is empty, false otherwise.

◆ txstack_entry_init()

PICOTM_NOTHROW void txstack_entry_init ( struct txstack_entry self)
Parameters
selfThe stack entry to initialize.

◆ txstack_entry_init_tm()

PICOTM_NOTHROW void txstack_entry_init_tm ( struct txstack_entry self)
Parameters
selfThe stack entry to initialize.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txstack_entry_uninit()

PICOTM_NOTHROW void txstack_entry_uninit ( struct txstack_entry self)
Parameters
selfThe stack entry to clean up.

◆ txstack_entry_uninit_tm()

PICOTM_NOTHROW void txstack_entry_uninit_tm ( struct txstack_entry self)
Parameters
selfThe stack entry to clean up.
Attention
This function expects the entry's memory to be owned by the calling transaction. Shared-memory locations have to be read/write privatized first.

◆ txstack_of_state_tx()

PICOTM_NOTHROW struct txstack* txstack_of_state_tx ( struct txstack_state stack_state)
Parameters
stack_stateThe stack state.
Returns
A transactional stack for the stack state.

◆ txstack_pop_tx()

PICOTM_NOTHROW void txstack_pop_tx ( struct txstack self)
Parameters
selfThe transactional stack.

◆ txstack_push_tx()

PICOTM_NOTHROW void txstack_push_tx ( struct txstack self,
struct txstack_entry entry 
)
Parameters
selfThe transactional stack.
entryThe stack entry to insert.

◆ txstack_size_tx()

PICOTM_NOTHROW size_t txstack_size_tx ( struct txstack self)
Parameters
selfThe transactional stack.
Returns
The number of entries on the transactional stack.

◆ txstack_state_clear_and_uninit_entries()

PICOTM_NOTHROW void txstack_state_clear_and_uninit_entries ( struct txstack_state self,
void(*)(struct txstack_entry *, void *)  uninit,
void *  data 
)
Parameters
selfThe stack state to clear.
uninitThe stack-entry clean-up function.
dataThe clean-up function's data parameter.

◆ txstack_state_init()

PICOTM_NOTHROW void txstack_state_init ( struct txstack_state self)
Parameters
selfThe stack state to initialize.

◆ txstack_state_uninit()

PICOTM_NOTHROW void txstack_state_uninit ( struct txstack_state self)
Parameters
selfThe stack state to clean up.

◆ txstack_top_tx()

PICOTM_NOTHROW struct txstack_entry* txstack_top_tx ( struct txstack self)
Parameters
selfThe transactional stack.
Returns
The entry at the transactional stack's front end.