#include <cafe/os.h> u64 OSSetAtomic64(volatile OSAtomicVar64* ptr, u64 val);
ptr | Pointer to data to set atomically. |
---|---|
val | Value to set atomically to the value in memory. |
Previous value.
OSSetAtomic64
sets an 64-bit atomic value to memory.
This function is an addition for the 64-bit atomics, to protect against accessing the two
32-bit values in the middle of an update. You should use this function to set the atomic
value instead of direct access.
It does not act as a memory barrier.
The 64-bit atomics use a lock to protect the multi-word atomic value (CPU is 32-bit).
None.
OSAddAtomic64
OSAndAtomic64
OSCompareAndSwapAtomic64
OSCompareAndSwapAtomicEx64
OSDecAtomic64
OSGetAtomic64
OSIncAtomic64
OSOrAtomic64
OSSwapAtomic64
OSTestAndClearAtomic64
OSTestAndSetAtomic64
OSXorAtomic64
2013/05/08 Automated cleanup pass.
2012/05/14 Match actual prototype
2010/08/30 Initial version.
CONFIDENTIAL