picotm  0.9.0
Functions

Provides transactional multisets. More...

#include <picotm/compiler.h>
#include <picotm/config/picotm-txlib-config.h>
#include <stdbool.h>
#include <stddef.h>
#include "picotm-txmultiset-state.h"

Functions

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_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 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...
 

Function Documentation

◆ 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_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_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.