mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Support gcc-like and C11-like memory fences
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user