|
Evo C++ Library v0.5.1
|
Evo threads and atomics. More...
Classes | |
| class | Atomic< T > |
| Atomic integer type. More... | |
| struct | AtomicFlag |
| Atomic signalling flag. More... | |
| class | AtomicPtr< T > |
| Atomic dumb pointer to single object. More... | |
| class | AtomicPtr< T[]> |
| Atomic dumb pointer to array. More... | |
| struct | Condition |
| Condition object for thread synchronization. More... | |
| struct | Mutex |
| Mutex for thread synchronization. More... | |
| struct | MutexInert |
| Inert mutex used to disable thread synchronization. More... | |
| struct | MutexRW |
| Read/Write Mutex for thread synchronization. More... | |
| struct | Singleton< T > |
| Manages a singleton instance for given type. More... | |
| struct | SleepLock |
| Variation of SpinLock for thread synchronization using sleep-wait. More... | |
| struct | SmartLock< T > |
| Smart locking for synchronization. More... | |
| struct | SmartLockInert< T > |
| Inert lock that doesn't do anything. More... | |
| struct | SmartLockRead< T > |
| Smart read-locking for synchronization. More... | |
| struct | SmartSleepLock< T > |
| Smart sleep-locking for synchronization. More... | |
| struct | SpinLock |
| Spin-lock for thread synchronization. More... | |
| struct | SysMutex |
| struct | SysThread |
| struct | Thread |
| Manages a single thread of execution. More... | |
| struct | ThreadClass |
| Base class for managing a single class-based thread of execution. More... | |
| struct | ThreadGroup< T, S, M > |
| Manages a group of threads with shared state. More... | |
| struct | ThreadScope< T > |
| Creates a single thread of execution in given scope. More... | |
| struct | ThreadScope< Thread > |
| Creates a single thread of execution in given scope. More... | |
Typedefs | |
| typedef Atomic< int > | AtomicInt |
| Atomic signed int. More... | |
| typedef Atomic< int32 > | AtomicInt32 |
| Atomic 32-bit signed int. More... | |
| typedef Atomic< int64 > | AtomicInt64 |
| Atomic 64-bit signed int. More... | |
| typedef Atomic< long > | AtomicLong |
| Atomic signed long. More... | |
| typedef Atomic< longl > | AtomicLongL |
| Atomic signed long long. More... | |
| typedef Atomic< uint > | AtomicUInt |
| Atomic unsigned int. More... | |
| typedef Atomic< uint32 > | AtomicUInt32 |
| Atomic 32-bit unsigned int. More... | |
| typedef Atomic< uint64 > | AtomicUInt64 |
| Atomic 64-bit unsigned int. More... | |
| typedef Atomic< ulong > | AtomicULong |
| Atomic unsigned long. More... | |
| typedef Atomic< ulongl > | AtomicULongL |
| Atomic unsigned long long. More... | |
| typedef PtrBase< T, Atomic< T * > > | Base |
| Base type. More... | |
| typedef PtrBase< T, Atomic< T * > > | Base |
| Base type. More... | |
| typedef pthread_t | Handle |
| typedef pthread_mutex_t | Handle |
| Mutex handle type. More... | |
| typedef SmartLockInert< MutexInert > | Lock |
| Lock object type (inert) – see SmartLockInert. More... | |
| typedef SmartLockInert< MutexInert > | LockRead |
| Read Lock object type (inert) – see SmartLockInert. More... | |
| typedef SmartLockInert< MutexInert > | LockWrite |
| Write Lock object type (inert) – see SmartLockInert. More... | |
| typedef std::memory_order | MemOrder |
| Atomic memory order (fence) type. More... | |
| typedef PtrBase< T > | PtrBaseT |
| Managed pointer base type. More... | |
| typedef PtrBase< T > | PtrBaseT |
| Managed pointer base type. More... | |
| typedef void *(* | RunFunc) (void *) |
| typedef SmartLockInert< MutexInert > | SleepLock |
| Sleep-Lock object type (inert) – see SmartLockInert. More... | |
| typedef Atomic< T > | This |
| This type. More... | |
| typedef AtomicPtr< T > | This |
| This type. More... | |
| typedef AtomicPtr< T[]> | This |
| This type. More... | |
Functions | |
| Atomic () | |
| Constructor, initializes with 0. More... | |
| Atomic (T num) | |
| Constructor. More... | |
| AtomicFlag () | |
| AtomicPtr () | |
| Default constructor sets as NULL. More... | |
| AtomicPtr (T *ptr) | |
| Constructor. More... | |
| AtomicPtr (const T *ptr) | |
| Constructor. More... | |
| AtomicPtr (const This &src) | |
| Copy constructor. More... | |
| AtomicPtr (const Base &src) | |
| Copy constructor to reference pointer. More... | |
| AtomicPtr (const PtrBaseT &src) | |
| Copy constructor to reference pointer. More... | |
| AtomicPtr () | |
| Default constructor sets as NULL. More... | |
| AtomicPtr (T *ptr) | |
| Constructor. More... | |
| AtomicPtr (const T *ptr) | |
| Constructor. More... | |
| AtomicPtr (const This &src) | |
| Copy constructor. More... | |
| AtomicPtr (const Base &src) | |
| Copy constructor to reference pointer. More... | |
| AtomicPtr (const PtrBaseT &src) | |
| Copy constructor to reference pointer. More... | |
| SmartLock (T &object, bool lock=true) | |
| Constructor. More... | |
| SmartLockInert (T &) | |
| Constructor – arg is ignored. More... | |
| SmartLockInert (T &, bool) | |
| Constructor – args are ignored. More... | |
| SmartLockInert (T &, ulong) | |
| Constructor – args are ignored. More... | |
| SmartLockRead (T &object, bool lock=true) | |
| Constructor. More... | |
| SmartSleepLock (T &object, ulong sleep_ms=1) | |
| Constructor. More... | |
| SysMutex () | |
| Constructor. More... | |
| SysThread () | |
| ~SmartLock () | |
| Destructor, unlocks if locked here. More... | |
| ~SmartLockRead () | |
| Destructor, unlocks if locked here. More... | |
| ~SmartSleepLock () | |
| Destructor, unlocks if locked here. More... | |
| ~SysMutex () | |
| Destructor. More... | |
| ~SysThread () | |
| void | clear (MemOrder mem_order=std::memory_order_seq_cst) |
| Clear flag (set to false). More... | |
| This & | clear () |
| Clear pointer, setting as null. More... | |
| This & | clear () |
| Clear pointer, setting as null. More... | |
| bool | compare_set (T cmpval, T newval, MemOrder mem_order_success=std::memory_order_seq_cst, MemOrder mem_order_failure=std::memory_order_acquire) |
| Compare and set, storing new value if comparison matches. More... | |
| void | detach () |
| T * | detach () |
| Detach and return pointer. More... | |
| T * | detach () |
| Detach and return pointer. More... | |
| T | exchange (T num, MemOrder mem_order=std::memory_order_seq_cst) |
| Exchange current value with new value. More... | |
| T | fetch_add (T num, MemOrder mem_order=std::memory_order_seq_cst) |
| Add number to value and return the previous value. More... | |
| T | fetch_and (T num, MemOrder mem_order=std::memory_order_seq_cst) |
| Bitwise AND with value and return the previous value. More... | |
| T | fetch_or (T num, MemOrder mem_order=std::memory_order_seq_cst) |
| Bitwise OR with value and return the previous value. More... | |
| T | fetch_sub (T num, MemOrder mem_order=std::memory_order_seq_cst) |
| Subtract number to value and return the previous value. More... | |
| T | fetch_xor (T num, MemOrder mem_order=std::memory_order_seq_cst) |
| Bitwise XOR with value and return the previous value. More... | |
| ulong | get_tid () |
| Get current thread ID from system. More... | |
| static ulong | id () |
| bool | join () |
| T | load (MemOrder mem_order=std::memory_order_seq_cst) const |
| Load and return current value. More... | |
| SmartLockInert & | lock () |
| Lock object (no-op). More... | |
| SmartLock & | lock () |
| Lock object, if not already locked by this. More... | |
| SmartLockInert & | lock (ulong) |
| Lock object (no-op). More... | |
| void | lock () |
| Lock object (no-op). More... | |
| SmartLockRead & | lock () |
| Read-Lock object, if not already locked by this. More... | |
| SmartSleepLock & | lock (ulong sleep_ms=1) |
| Lock object, if not already locked by this. More... | |
| void | lock () |
| Spin-lock flag. More... | |
| void | lock () |
| Lock mutex. More... | |
| void | lock_read () |
| Read-lock object (no-op). More... | |
| T | operator &= (T num) |
| Bitwise AND value and return new value. More... | |
| operator T () const | |
| Implicit conversion to integer type. More... | |
| bool | operator! () const |
| Negation operator checks if NULL/false (0). More... | |
| bool | operator!= (const This &num) const |
| Compare whether current value is not equal to number. More... | |
| bool | operator!= (T num) const |
| Compare whether current value is not equal to number. More... | |
| bool | operator!= (const PtrBaseT &ptr) const |
| Inequality operator. More... | |
| bool | operator!= (const PtrBaseT &ptr) const |
| Inequality operator. More... | |
| template<class T > | |
| bool | operator!= (const PtrBase< T > &ptr1, const PtrBase< T, Atomic< T *> > &ptr2) |
| Inequality operator for managed pointer base and atomic pointer base. More... | |
| T | operator++ () |
| Increment value and return new value. More... | |
| T | operator++ (int) |
| Increment value and return previous value. More... | |
| T * | operator++ () |
| Prefix increment operator. More... | |
| T * | operator++ (int) |
| Prefix increment operator. More... | |
| T * | operator++ () |
| Prefix increment operator. More... | |
| T * | operator++ (int) |
| Prefix increment operator. More... | |
| T | operator+= (T num) |
| Increment value and return new value. More... | |
| This & | operator+= (int count) |
| Increment by count operator. More... | |
| This & | operator+= (int count) |
| Increment by count operator. More... | |
| T | operator-- () |
| Decrement value and return new value. More... | |
| T | operator-- (int) |
| Decrement value and return previous value. More... | |
| T * | operator-- () |
| Prefix decrement operator. More... | |
| T * | operator-- (int) |
| Postfix decrement operator. More... | |
| T * | operator-- () |
| Prefix decrement operator. More... | |
| T * | operator-- (int) |
| Postfix decrement operator. More... | |
| T | operator-= (T num) |
| Decrement value and return new value. More... | |
| This & | operator-= (int count) |
| Decrement by count operator. More... | |
| This & | operator-= (int count) |
| Decrement by count operator. More... | |
| const T | operator-> () const |
| Member access operator (const). More... | |
| T | operator-> () |
| Member access operator. More... | |
| bool | operator< (T num) const |
| Compare whether current value is less than number. More... | |
| bool | operator< (const PtrBaseT &ptr) const |
| Less-than operator. More... | |
| bool | operator< (const PtrBaseT &ptr) const |
| Less-than operator. More... | |
| template<class T > | |
| bool | operator< (const PtrBase< T > &ptr1, const PtrBase< T, Atomic< T *> > &ptr2) |
| Less-than operator for managed pointer base and atomic pointer base. More... | |
| bool | operator<= (T num) const |
| Compare whether current value is less than or equal to number. More... | |
| bool | operator<= (const PtrBaseT &ptr) const |
| Less-than-or-equals operator. More... | |
| bool | operator<= (const PtrBaseT &ptr) const |
| Less-than-or-equals operator. More... | |
| template<class T > | |
| bool | operator<= (const PtrBase< T > &ptr1, const PtrBase< T, Atomic< T *> > &ptr2) |
| Less-than-or-equals operator for managed pointer base and atomic pointer base. More... | |
| This & | operator= (T num) |
| Store new value. More... | |
| This & | operator= (const This &src) |
| Copy/Assignment operator. More... | |
| This & | operator= (const Base &src) |
| Assignment operator to reference pointer. More... | |
| This & | operator= (const PtrBaseT &src) |
| Assignment operator to reference pointer. More... | |
| This & | operator= (T *ptr) |
| Assignment operator for raw pointer. More... | |
| This & | operator= (const T *ptr) |
| Assignment operator for raw pointer. More... | |
| This & | operator= (const This &src) |
| Copy/Assignment operator. More... | |
| This & | operator= (const Base &src) |
| Assignment operator to reference pointer. More... | |
| This & | operator= (const PtrBaseT &src) |
| Assignment operator to reference pointer. More... | |
| This & | operator= (T *ptr) |
| Assignment operator for raw pointer. More... | |
| This & | operator= (const T *ptr) |
| Assignment operator for raw pointer. More... | |
| bool | operator== (const This &num) const |
| Compare whether current value is equal to number. More... | |
| bool | operator== (T num) const |
| Compare whether current value is equal to number. More... | |
| bool | operator== (const PtrBaseT &ptr) const |
| Equality operator. More... | |
| bool | operator== (const PtrBaseT &ptr) const |
| Equality operator. More... | |
| template<class T > | |
| bool | operator== (const PtrBase< T > &ptr1, const PtrBase< T, Atomic< T *> > &ptr2) |
| Equality operator for managed pointer base and atomic pointer base. More... | |
| bool | operator> (T num) const |
| Compare whether current value is greater than number. More... | |
| bool | operator> (const PtrBaseT &ptr) const |
| Greater-than operator. More... | |
| bool | operator> (const PtrBaseT &ptr) const |
| Greater-than operator. More... | |
| template<class T > | |
| bool | operator> (const PtrBase< T > &ptr1, const PtrBase< T, Atomic< T *> > &ptr2) |
| Greater-than operator for managed pointer base and atomic pointer base. More... | |
| bool | operator>= (T num) const |
| Compare whether current value is greater than or equal to number. More... | |
| bool | operator>= (const PtrBaseT &ptr) const |
| Greater-than-or-equals operator. More... | |
| bool | operator>= (const PtrBaseT &ptr) const |
| Greater-than-or-equals operator. More... | |
| template<class T > | |
| bool | operator>= (const PtrBase< T > &ptr1, const PtrBase< T, Atomic< T *> > &ptr2) |
| Greater-than-or-equals operator for managed pointer base and atomic pointer base. More... | |
| T | operator^= (T num) |
| Bitwise XOR value and return new value. More... | |
| T | operator|= (T num) |
| Bitwise OR value and return new value. More... | |
| void | sleeplock (ulong) |
| Lock object (no-op). More... | |
| void | sleeplock (ulong ms=1) |
| Spin-lock flag with a sleep. More... | |
| Error | start (RunFunc run_func, void *run_ptr) |
| void | store (T num, MemOrder mem_order=std::memory_order_seq_cst) |
| Store new value. More... | |
| bool | test_and_set (MemOrder mem_order=std::memory_order_seq_cst) |
| Atomically set flag (to true) and return the previous value. More... | |
| bool | trylock () |
| Try to lock (no-op). More... | |
| bool | trylock () |
| Try to lock mutex without blocking. More... | |
| bool | trylock (ulong timeout_ms) |
| Try to lock mutex with a timeout. More... | |
| bool | trylock_read () |
| Try to read-lock (no-op). More... | |
| SmartLockInert & | unlock () |
| Unlock object (no-op). More... | |
| SmartLock & | unlock () |
| Unlock object, if locked by this. More... | |
| void | unlock () |
| Unlock object (no-op). More... | |
| SmartLockRead & | unlock () |
| Read-Unlock object, if locked by this. More... | |
| SmartSleepLock & | unlock () |
| Unlock object, if locked by this. More... | |
| void | unlock () |
| Spin-unlock flag. More... | |
| void | unlock () |
| Unlock mutex. More... | |
| void | unlock_read () |
| Un-read-lock object (no-op). More... | |
| static void | yield () |
Variables | |
| bool | attached |
| Handle | handle |
| Handle | handle |
| Mutex handle – do not modify. More... | |
| bool | locked_ |
| Whether object is locked by this. More... | |
| bool | locked_ |
| Whether object is read-locked by this. More... | |
| bool | locked_ |
| Whether object is read-locked by this. More... | |
| T & | object_ |
| Synchronization object to lock. More... | |
| T & | object_ |
| Synchronization object to read-lock. More... | |
| T & | object_ |
| Synchronization object to read-lock. More... | |
Evo threads and atomics.
| typedef Atomic<int32> AtomicInt32 |
Atomic 32-bit signed int.
| typedef Atomic<int64> AtomicInt64 |
Atomic 64-bit signed int.
| typedef Atomic<long> AtomicLong |
Atomic signed long.
| typedef Atomic<longl> AtomicLongL |
Atomic signed long long.
| typedef Atomic<uint> AtomicUInt |
Atomic unsigned int.
| typedef Atomic<uint32> AtomicUInt32 |
Atomic 32-bit unsigned int.
| typedef Atomic<uint64> AtomicUInt64 |
Atomic 64-bit unsigned int.
| typedef Atomic<ulong> AtomicULong |
Atomic unsigned long.
| typedef Atomic<ulongl> AtomicULongL |
Atomic unsigned long long.
| typedef pthread_t Handle |
| typedef SmartLockInert<MutexInert> Lock |
Lock object type (inert) – see SmartLockInert.
| typedef SmartLockInert<MutexInert> LockRead |
Read Lock object type (inert) – see SmartLockInert.
| typedef SmartLockInert<MutexInert> LockWrite |
Write Lock object type (inert) – see SmartLockInert.
| typedef std::memory_order MemOrder |
Atomic memory order (fence) type.
| typedef void*(* RunFunc) (void *) |
| typedef SmartLockInert<MutexInert> SleepLock |
Sleep-Lock object type (inert) – see SmartLockInert.
|
inline |
Constructor, initializes with 0.
|
inline |
Constructor.
| num | Number value to initialize with |
|
inline |
|
inline |
Default constructor sets as NULL.
|
inline |
Constructor.
| ptr | Pointer to set, NULL for none |
|
inline |
Constructor.
| ptr | Pointer to set, NULL for none |
Copy constructor to reference pointer.
| src | Source pointer |
Copy constructor to reference pointer.
| src | Source pointer |
|
inline |
Default constructor sets as NULL.
|
inline |
Constructor.
| ptr | Pointer to set, NULL for none |
|
inline |
Constructor.
| ptr | Pointer to set, NULL for none |
Copy constructor to reference pointer.
| src | Source pointer |
Copy constructor to reference pointer.
| src | Source pointer |
|
inline |
Constructor.
| object | Synchronization object to use |
| lock | Whether to lock here |
|
inline |
Constructor – arg is ignored.
|
inline |
Constructor – args are ignored.
|
inline |
Constructor – args are ignored.
|
inline |
Constructor.
| object | Synchronization object to use |
| lock | Whether to read-lock here |
|
inline |
Constructor.
| object | Synchronization object to use |
| sleep_ms | Sleep time in milliseconds while waiting for lock, 0 to leave unlocked |
|
inline |
Constructor.
|
inline |
|
inline |
Destructor, unlocks if locked here.
|
inline |
Destructor, unlocks if locked here.
|
inline |
Destructor, unlocks if locked here.
|
inline |
Destructor.
|
inline |
| void clear | ( | MemOrder | mem_order = std::memory_order_seq_cst | ) |
Clear flag (set to false).
|
inline |
Clear pointer, setting as null.
|
inline |
Clear pointer, setting as null.
|
inline |
Compare and set, storing new value if comparison matches.
| cmpval | Old value to compare with |
| newval | New value to set if equal to oldval |
| mem_order_success | Memory order constraints to enforce when comparison succeeds |
| mem_order_failure | Memory order constraints to enforce when comparison fails – must not be: EVO_ATOMIC_RELEASE or EVO_ATOMIC_ACQ_REL
|
|
inline |
|
inline |
Detach and return pointer.
|
inline |
Detach and return pointer.
| T exchange | ( | T | num, |
| MemOrder | mem_order = std::memory_order_seq_cst |
||
| ) |
Exchange current value with new value.
| num | New value to store |
| mem_order | Memory order constraints to enforce, except EVO_ATOMIC_CONSUME not supported here |
| T fetch_add | ( | T | num, |
| MemOrder | mem_order = std::memory_order_seq_cst |
||
| ) |
Add number to value and return the previous value.
| num | Number to add |
| mem_order | Memory order constraints to enforce |
| T fetch_and | ( | T | num, |
| MemOrder | mem_order = std::memory_order_seq_cst |
||
| ) |
Bitwise AND with value and return the previous value.
| num | Number to AND with |
| mem_order | Memory order constraints to enforce |
| T fetch_or | ( | T | num, |
| MemOrder | mem_order = std::memory_order_seq_cst |
||
| ) |
Bitwise OR with value and return the previous value.
| num | Number to OR with |
| mem_order | Memory order constraints to enforce |
| T fetch_sub | ( | T | num, |
| MemOrder | mem_order = std::memory_order_seq_cst |
||
| ) |
Subtract number to value and return the previous value.
| num | Number to subtract |
| mem_order | Memory order constraints to enforce |
| T fetch_xor | ( | T | num, |
| MemOrder | mem_order = std::memory_order_seq_cst |
||
| ) |
Bitwise XOR with value and return the previous value.
| num | Number toXOR with |
| mem_order | Memory order constraints to enforce |
|
inline |
|
inlinestatic |
|
inline |
| T load | ( | MemOrder | mem_order = std::memory_order_seq_cst | ) | const |
Load and return current value.
| mem_order | Memory order constraints to enforce, must be EVO_ATOMIC_RELAXED, EVO_ATOMIC_CONSUME, EVO_ATOMIC_ACQUIRE, or EVO_ATOMIC_SYNC |
|
inline |
Lock object (no-op).
|
inline |
Lock object, if not already locked by this.
|
inline |
Lock object (no-op).
|
inline |
Lock object (no-op).
|
inline |
Read-Lock object, if not already locked by this.
|
inline |
Lock object, if not already locked by this.
| sleep_ms | Sleep time in milliseconds while waiting for lock, 0 to leave unlocked |
|
inline |
Spin-lock flag.
|
inline |
|
inline |
Read-lock object (no-op).
| T operator&= | ( | T | num | ) |
Bitwise AND value and return new value.
|
inline |
Implicit conversion to integer type.
|
inline |
Negation operator checks if NULL/false (0).
Compare whether current value is not equal to number.
| num | Number to compare with |
|
inline |
Compare whether current value is not equal to number.
| num | Number to compare with |
Inequality operator.
| ptr | Pointer to compare to |
Inequality operator.
| ptr | Pointer to compare to |
Inequality operator for managed pointer base and atomic pointer base.
| ptr1 | Pointer to compare |
| ptr2 | Pointer to compare to |
| T operator++ | ( | ) |
Increment value and return new value.
| T operator++ | ( | int | ) |
Increment value and return previous value.
|
inline |
Prefix increment operator.
|
inline |
Prefix increment operator.
|
inline |
Prefix increment operator.
|
inline |
Prefix increment operator.
| T operator+= | ( | T | num | ) |
Increment value and return new value.
|
inline |
Increment by count operator.
| count | Count to increment |
|
inline |
Increment by count operator.
| count | Count to increment |
| T operator-- | ( | ) |
Decrement value and return new value.
| T operator-- | ( | int | ) |
Decrement value and return previous value.
|
inline |
Prefix decrement operator.
|
inline |
Postfix decrement operator.
|
inline |
Prefix decrement operator.
|
inline |
Postfix decrement operator.
| T operator-= | ( | T | num | ) |
Decrement value and return new value.
|
inline |
Decrement by count operator.
| count | Count to decrement |
|
inline |
Decrement by count operator.
| count | Count to decrement |
|
inline |
Member access operator (const).
|
inline |
Member access operator.
|
inline |
Compare whether current value is less than number.
| num | Number to compare with |
|
inline |
Less-than operator.
| ptr | Pointer to compare to |
|
inline |
Less-than operator.
| ptr | Pointer to compare to |
Less-than operator for managed pointer base and atomic pointer base.
| ptr1 | Pointer to compare |
| ptr2 | Pointer to compare to |
|
inline |
Compare whether current value is less than or equal to number.
| num | Number to compare with |
|
inline |
Less-than-or-equals operator.
| ptr | Pointer to compare to |
|
inline |
Less-than-or-equals operator.
| ptr | Pointer to compare to |
Less-than-or-equals operator for managed pointer base and atomic pointer base.
| ptr1 | Pointer to compare |
| ptr2 | Pointer to compare to |
|
inline |
Store new value.
| num | Value to store |
Copy/Assignment operator.
| src | Source pointer |
Assignment operator to reference pointer.
| src | Source pointer |
Assignment operator to reference pointer.
| src | Source pointer |
|
inline |
Assignment operator for raw pointer.
| ptr | Pointer to set |
|
inline |
Assignment operator for raw pointer.
| ptr | Pointer to set |
Copy/Assignment operator.
| src | Source pointer |
Assignment operator to reference pointer.
| src | Source pointer |
Assignment operator to reference pointer.
| src | Source pointer |
|
inline |
Assignment operator for raw pointer.
| ptr | Pointer to set |
|
inline |
Assignment operator for raw pointer.
| ptr | Pointer to set |
|
inline |
Compare whether current value is equal to number.
| num | Number to compare with |
|
inline |
Compare whether current value is equal to number.
| num | Number to compare with |
|
inline |
Equality operator.
| ptr | Pointer to compare to |
|
inline |
Equality operator.
| ptr | Pointer to compare to |
Equality operator for managed pointer base and atomic pointer base.
| ptr1 | Pointer to compare |
| ptr2 | Pointer to compare to |
|
inline |
Compare whether current value is greater than number.
| num | Number to compare with |
|
inline |
Greater-than operator.
| ptr | Pointer to compare to |
|
inline |
Greater-than operator.
| ptr | Pointer to compare to |
Greater-than operator for managed pointer base and atomic pointer base.
| ptr1 | Pointer to compare |
| ptr2 | Pointer to compare to |
|
inline |
Compare whether current value is greater than or equal to number.
| num | Number to compare with |
|
inline |
Greater-than-or-equals operator.
| ptr | Pointer to compare to |
|
inline |
Greater-than-or-equals operator.
| ptr | Pointer to compare to |
Greater-than-or-equals operator for managed pointer base and atomic pointer base.
| ptr1 | Pointer to compare |
| ptr2 | Pointer to compare to |
| T operator^= | ( | T | num | ) |
Bitwise XOR value and return new value.
| T operator|= | ( | T | num | ) |
Bitwise OR value and return new value.
|
inline |
Lock object (no-op).
|
inline |
Spin-lock flag with a sleep.
| ms | Sleep time in milliseconds while waiting for lock, must be positive |
| void store | ( | T | num, |
| MemOrder | mem_order = std::memory_order_seq_cst |
||
| ) |
Store new value.
| num | Value to store |
| mem_order | Memory order constraints to enforce, must be EVO_ATOMIC_RELAXED, EVO_ATOMIC_RELEASE, or EVO_ATOMIC_SYNC |
| bool test_and_set | ( | MemOrder | mem_order = std::memory_order_seq_cst | ) |
Atomically set flag (to true) and return the previous value.
|
inline |
Try to lock (no-op).
|
inline |
Try to lock mutex without blocking.
|
inline |
Try to lock mutex with a timeout.
| timeout_ms | Timeout in milliseconds |
|
inline |
Try to read-lock (no-op).
|
inline |
Unlock object (no-op).
|
inline |
Unlock object, if locked by this.
|
inline |
Unlock object (no-op).
|
inline |
Read-Unlock object, if locked by this.
|
inline |
Unlock object, if locked by this.
|
inline |
Spin-unlock flag.
|
inline |
Unlock mutex.
|
inline |
Un-read-lock object (no-op).
|
inlinestatic |
| bool attached |
| Handle handle |
|
protected |
Whether object is locked by this.
|
protected |
Whether object is read-locked by this.
|
protected |
Whether object is read-locked by this.
| T& object_ |
Synchronization object to lock.
| T& object_ |
Synchronization object to read-lock.
| T& object_ |
Synchronization object to read-lock.
1.8.13