25 #ifndef TERVEL_MCAS_CASROW_H_
26 #define TERVEL_MCAS_CASROW_H_
32 namespace algorithms {
49 CasRow<T>(std::atomic<T> *address, T expected_value, T new_value)
57 friend bool operator<(const CasRow<T>& a,
const CasRow<T>& b) {
58 return ((uintptr_t)a.address_) < ((uintptr_t)b.address_);
94 #endif // TERVEL_MCAS_CASROW_H_
This class is used to represent a one of the M CAS operations performed by an MCAS operation...
Definition: mcas_casrow.h:45
friend bool operator!=(const CasRow< T > &a, const CasRow< T > &b)
Definition: mcas_casrow.h:66
T expected_value_
Definition: mcas_casrow.h:85
TODO(steven):
Definition: mcas.h:36
friend bool operator>(const CasRow< T > &a, const CasRow< T > &b)
Definition: mcas_casrow.h:60
std::atomic< T > * address_
Definition: mcas_casrow.h:82
std::atomic< Helper< T > * > helper_
Definition: mcas_casrow.h:87
friend bool operator==(const CasRow< T > &a, const CasRow< T > &b)
Definition: mcas_casrow.h:63
T new_value_
Definition: mcas_casrow.h:86
friend 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 ...
Definition: mcas_casrow.h:77
This class is the MCAS operation's helper.
Definition: mcas_casrow.h:37