Galois
|
PtrLock is a spinlock and a pointer. More...
#include <PtrLock.h>
Public Member Functions | |
constexpr | PtrLock () |
PtrLock (const PtrLock &p) | |
PtrLock & | operator= (const PtrLock &p) |
void | lock () |
void | unlock () |
void | unlock_and_clear () |
void | unlock_and_set (T *val) |
T * | getValue () const |
void | setValue (T *val) |
bool | try_lock () |
bool | is_locked () const |
bool | CAS (T *oldval, T *newval) |
CAS only works on unlocked values the lock bit will prevent a successful cas. More... | |
bool | stealing_CAS (T *oldval, T *newval) |
CAS that works on locked values; this can be very dangerous when used incorrectly. More... | |
PtrLock is a spinlock and a pointer.
This wraps a pointer and uses the low order bit for the lock flag Copying a lock is unsynchronized (relaxed ordering)
|
inline |
|
inline |
|
inline |
CAS only works on unlocked values the lock bit will prevent a successful cas.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
CAS that works on locked values; this can be very dangerous when used incorrectly.
|
inline |
|
inline |
|
inline |
|
inline |