picotm  0.8.0
Functions

Provides transactional queues. More...

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

Functions

PICOTM_NOTHROW struct txqueuetxqueue_of_state_tx (struct txqueue_state *queue_state)
 Creates a transactional queue for a queue state. More...
 
PICOTM_NOTHROW bool txqueue_empty_tx (struct txqueue *self)
 Tests a transactional queue for emptiness. More...
 
PICOTM_NOTHROW size_t txqueue_size_tx (struct txqueue *self)
 Returns the number of entries in 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 txqueue_entrytxqueue_back_tx (struct txqueue *self)
 Retruns the back-end entry of a transactional queue. 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...
 

Function Documentation

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