Typedefs | |
| typedef long | Type |
| Data type for interlockee operations. | |
Functions | |
| Type | Increment (Type &target) |
| The function increments (increases by one) the value of the specified variable. | |
| Type | Decrement (Type &target) |
| The function decrements (decreases by one) the value of the specified variable. | |
| Type | Exchange (Type &target, sint32 new_value) |
| The function atomically exchanges a pair of values. | |
| Type | Add (Type &target, sint32 value_to_add) |
| The function performs an atomic addition of an increment value to an addend variable. | |
| typedef long TC::Interlocked::Type |
| Type TC::Interlocked::Increment | ( | Type & | target | ) |
The function increments (increases by one) the value of the specified variable.
The function prevents more than one thread from using the same variable simultaneously.
| target | [in, out] reference of the variable to be incremented. |
Referenced by TC::Impl::SharedPtrCountBase::AddReference(), and TC::Impl::SharedPtrCountBase::AddWeakReference().

| Type TC::Interlocked::Decrement | ( | Type & | target | ) |
The function decrements (decreases by one) the value of the specified variable.
The function prevents more than one thread from using the same variable simultaneously.
| target | [in, out] reference of the variable to be decremented. |
Referenced by TC::Impl::SharedPtrCountBase::ReleaseReference(), and TC::Impl::SharedPtrCountBase::ReleaseWeakReference().

| Type TC::Interlocked::Exchange | ( | Type & | target, | |
| sint32 | new_value | |||
| ) |
The function atomically exchanges a pair of values.
The function prevents more than one thread from using the same variable simultaneously.
| target | [in, out] reference to the value to be exchanged. The function sets this variable to new_value, and returns its prior value. | |
| new_value | [in] Value to be exchanged with the value pointed to by Target. |
| Type TC::Interlocked::Add | ( | Type & | target, | |
| sint32 | value_to_add | |||
| ) |
The function performs an atomic addition of an increment value to an addend variable.
The function prevents more than one thread from using the same variable simultaneously.
| target | [in, out] Pointer to the value that is to have Value added to it. | |
| value_to_add | [in] Value to be added to the variable pointed to by the Addend parameter. |