picotm  0.8.0
Functions

Provides transactional stacks. More...

#include <picotm/compiler.h>
#include <stdbool.h>
#include <stddef.h>
#include "picotm-txstack-state.h"

Functions

PICOTM_NOTHROW struct txstacktxstack_of_state_tx (struct txstack_state *stack_state)
 Creates a transactional stack for a stack state. More...
 
PICOTM_NOTHROW bool txstack_empty_tx (struct txstack *self)
 Tests a transactional stack for emptiness. More...
 
PICOTM_NOTHROW size_t txstack_size_tx (struct txstack *self)
 Returns the number of entries on a transactional stack. More...
 
PICOTM_NOTHROW struct txstack_entrytxstack_top_tx (struct txstack *self)
 Returns the top-most entry of a transactional stack. 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...
 

Function Documentation

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