Add ATOMIC_GET
This commit is contained in:
@@ -34,6 +34,11 @@
|
||||
*/
|
||||
#define UC_ATOMIC_INC(ptr) UC_ATOMIC_ADD((ptr), 1)
|
||||
|
||||
/**
|
||||
* Atomically get the value of *ptr
|
||||
* @return value of *ptr
|
||||
*/
|
||||
#define UC_ATOMIC_GET(ptr) UC_ATOMIC_ADD((ptr), 0)
|
||||
|
||||
/**
|
||||
* Atomic Compare-And-Swap. If *ptr is oldval, write newwal to *ptr.
|
||||
|
||||
Reference in New Issue
Block a user