Reorder macro to be more consistent
This commit is contained in:
@@ -8,17 +8,18 @@
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
/**
|
||||
* Atomically subtract val from *ptr
|
||||
* @return *ptr before the subtraction
|
||||
*/
|
||||
#define UC_ATOMIC_SUB(ptr, val) __sync_fetch_and_add((ptr), -(val))
|
||||
|
||||
/**
|
||||
* Atomically add val to *ptr
|
||||
* @return *ptr before the addition
|
||||
*/
|
||||
#define UC_ATOMIC_ADD(ptr, val) __sync_fetch_and_add((ptr), (val))
|
||||
|
||||
/**
|
||||
* Atomically subtract val from *ptr
|
||||
* @return *ptr before the subtraction
|
||||
*/
|
||||
#define UC_ATOMIC_SUB(ptr, val) __sync_fetch_and_add((ptr), -(val))
|
||||
|
||||
/**
|
||||
* Atomically decrement *ptr
|
||||
|
||||
Reference in New Issue
Block a user