Go to the source code of this file.
|
LIB_API const char * | cpu_IdentifierString () |
|
LIB_API intptr_t | cpu_AtomicAdd (volatile intptr_t *location, intptr_t increment) |
| add a signed value to a variable without the possibility of interference from other threads/CPUs. More...
|
|
LIB_API bool | cpu_CAS (volatile intptr_t *location, intptr_t expected, intptr_t newValue) |
| atomic "compare and swap". More...
|
|
LIB_API bool | cpu_CAS64 (volatile i64 *location, i64 expected, i64 newValue) |
|
template<typename T > |
bool | cpu_CAS (volatile T *location, T expected, T new_value) |
| specialization of cpu_CAS for pointer types. More...
|
|
LIB_API void | cpu_Test () |
|
void | cpu_Pause () |
| pause in spin-wait loops, as a performance optimisation. More...
|
|
LIB_API intptr_t cpu_AtomicAdd |
( |
volatile intptr_t * |
location, |
|
|
intptr_t |
increment |
|
) |
| |
add a signed value to a variable without the possibility of interference from other threads/CPUs.
- Returns
- the previous value.
Definition at line 31 of file arm.cpp.
LIB_API bool cpu_CAS |
( |
volatile intptr_t * |
location, |
|
|
intptr_t |
expected, |
|
|
intptr_t |
newValue |
|
) |
| |
atomic "compare and swap".
- Parameters
-
location | address of the word to compare and possibly overwrite |
expected | its expected value |
newValue | the value with which to replace it |
- Returns
- false if the target word doesn't match the expected value, otherwise true (also overwriting the contents of location)
Definition at line 36 of file arm.cpp.
template<typename T >
bool cpu_CAS |
( |
volatile T * |
location, |
|
|
T |
expected, |
|
|
T |
new_value |
|
) |
| |
|
inline |
specialization of cpu_CAS for pointer types.
this avoids error-prone casting in user code.
Definition at line 80 of file cpu.h.
LIB_API bool cpu_CAS64 |
( |
volatile i64 * |
location, |
|
|
i64 |
expected, |
|
|
i64 |
newValue |
|
) |
| |
LIB_API const char* cpu_IdentifierString |
( |
| ) |
|
- Returns
- string identifying the CPU (usually a cleaned-up version of the brand string)
Definition at line 46 of file arm.cpp.
pause in spin-wait loops, as a performance optimisation.
Definition at line 91 of file cpu.h.
LIB_API void cpu_Test |
( |
| ) |
|