Support gcc-like and C11-like memory fences
This commit is contained in:
parent
e95d437f84
commit
5e4affe9d8
@ -258,8 +258,10 @@ extern void ct_unpoison(const void *, size_t);
|
||||
# define UNPOISON(X, L) (void) 0
|
||||
#endif
|
||||
|
||||
#ifdef __ATOMIC_ACQUIRE
|
||||
#ifdef HAVE_GCC_MEMORY_FENCES
|
||||
# define ACQUIRE_FENCE __atomic_thread_fence(__ATOMIC_ACQUIRE)
|
||||
#elif defined(HAVE_C11_MEMORY_FENCES)
|
||||
# define ACQUIRE_FENCE atomic_thread_fence(memory_order_acquire)
|
||||
#else
|
||||
# define ACQUIRE_FENCE (void) 0
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user