#include <cel_syncobjs.h>
List of all members.
Static Public Member Functions |
| static size_t | inc (volatile size_t *pNum) |
| static size_t | dec (volatile size_t *pNum) |
| static size_t | cmpxchg (size_t *dest, size_t xchg, size_t compare) |
| static void * | cmpxchg_ptr (void **dest, void *xchg, void *compare) |
| static size_t | xchg (size_t *dest, size_t val) |
| static void * | xchg_ptr (void **dest, void *val) |
| static size_t | xchg_add (size_t *dest, size_t incr) |
Detailed Description
This struct provides functions of thread-safe interlocked increment decrement. Although the same operation could be done using Mutex instread of this class, the implementation of this class is faster than Mutex. Mutex
Member Function Documentation
| static size_t Celartem::ThreadSafeOperation::cmpxchg |
( |
size_t * |
dest, |
|
|
size_t |
xchg, |
|
|
size_t |
compare | |
|
) |
| | [static] |
InterlockedCompareExchange
| static void* Celartem::ThreadSafeOperation::cmpxchg_ptr |
( |
void ** |
dest, |
|
|
void * |
xchg, |
|
|
void * |
compare | |
|
) |
| | [static] |
InterlockedCompareExchangePtr
| static size_t Celartem::ThreadSafeOperation::dec |
( |
volatile size_t * |
pNum |
) |
[static] |
This function decrements the specified size_t variable.
- Parameters:
-
| pNum | Pointer to the size_t variable. |
- Returns:
- The function returns the resulting decremented value.
| static size_t Celartem::ThreadSafeOperation::inc |
( |
volatile size_t * |
pNum |
) |
[static] |
This function increments the specified size_t variable.
- Parameters:
-
| pNum | Pointer to the size_t variable. |
- Returns:
- The function returns the resulting incremented value.
| static size_t Celartem::ThreadSafeOperation::xchg |
( |
size_t * |
dest, |
|
|
size_t |
val | |
|
) |
| | [static] |
| static size_t Celartem::ThreadSafeOperation::xchg_add |
( |
size_t * |
dest, |
|
|
size_t |
incr | |
|
) |
| | [static] |
| static void* Celartem::ThreadSafeOperation::xchg_ptr |
( |
void ** |
dest, |
|
|
void * |
val | |
|
) |
| | [static] |
The documentation for this struct was generated from the following file: