Tervel
1.0.0
A collection of wait-free containers and algorithms.
|
RingBuffer value class, values stored in the class must extend it. More...
#include <ring_buffer.h>
Public Member Functions | |
Value () | |
Empty constructor. More... | |
Public Attributes | |
friend | RingBuffer |
Private Member Functions | |
int64_t | func_seqid () |
Returns the items seqid. More... | |
void | func_seqid (int64_t s) |
Sets the items seqid. More... | |
void | atomic_change_seqid (int64_t e, int64_t n) |
Conditionally updates the seqid. More... | |
Private Attributes | |
int64_t | seqid_ {-1} |
RingBuffer value class, values stored in the class must extend it.
This class is necessary to provide the FIFO property. It adds a sequence identifier to each value stored. Using this identifier, we are apply generate FIFO valid sequential history from a concurrent history.
|
inline |
Empty constructor.
Empty Constructor
|
inlineprivate |
Conditionally updates the seqid.
This function is used when multiple threads maybe enqueueing the same value
e | expected seqid (address of the oprec * -1). |
n | new seqid |
|
inlineprivate |
Returns the items seqid.
Returns the items seqid
|
inlineprivate |
Sets the items seqid.
Sets the items seqid
friend tervel::containers::wf::RingBuffer< T >::Value::RingBuffer |
|
private |