Tervel
1.0.0
A collection of wait-free containers and algorithms.
|
This class is used to represent a one of the M CAS operations performed by an MCAS operation. More...
#include <mcas_casrow.h>
Public Member Functions | |
CasRow () | |
CasRow (std::atomic< T > *address, T expected_value, T new_value) | |
~CasRow () | |
Public Attributes | |
std::atomic< T > * | address_ |
T | expected_value_ |
T | new_value_ |
std::atomic< Helper< T > * > | helper_ |
Friends | |
bool | operator< (const CasRow< T > &a, const CasRow< T > &b) |
bool | operator> (const CasRow< T > &a, const CasRow< T > &b) |
bool | operator== (const CasRow< T > &a, const CasRow< T > &b) |
bool | operator!= (const CasRow< T > &a, const CasRow< T > &b) |
void | swap (CasRow &a, CasRow &b) |
This funciton is used when the MCAS operation is sorted to re-arrange the CasRows so they are sorted in a decsending manner. More... | |
This class is used to represent a one of the M CAS operations performed by an MCAS operation.
It holds an address, expected value and new value for that address.
|
inline |
|
inline |
|
inline |
This funciton is used when the MCAS operation is sorted to re-arrange the CasRows so they are sorted in a decsending manner.
Sorting is important to prevent cyclic dependices between MCAS operations. We choose descedning as a secondary bound on the number of MCAS operations. That could interfer with this operation.
std::atomic<T>* tervel::algorithms::wf::mcas::CasRow< T >::address_ |
T tervel::algorithms::wf::mcas::CasRow< T >::expected_value_ |
std::atomic<Helper<T> *> tervel::algorithms::wf::mcas::CasRow< T >::helper_ |
T tervel::algorithms::wf::mcas::CasRow< T >::new_value_ |