diff options
Diffstat (limited to 'include/atomic.h')
-rw-r--r-- | include/atomic.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/atomic.h b/include/atomic.h index 725d9c1f98..299f196e25 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -101,8 +101,8 @@ /* Store NEWVALUE in *MEM and return the old value. */ -#ifndef atomic_exchange -# define atomic_exchange(mem, newvalue) \ +#ifndef atomic_exchange_acq +# define atomic_exchange_acq(mem, newvalue) \ ({ __typeof (*(mem)) __oldval; \ __typeof (mem) __memp = (mem); \ __typeof (*(mem)) __value = (newvalue); \ @@ -117,6 +117,10 @@ __oldval; }) #endif +#ifndef atomic_exchange_rel +# define atomic_exchange_rel(mem, newvalue) atomic_exchange_acq (mem, newvalue) +#endif + /* Add VALUE to *MEM and return the old value of *MEM. */ #ifndef atomic_exchange_and_add |