mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
More detailed compile-time testing before attempting to use atomic load
intrinsics. See [forum:/forumpost/fc0237a39b30ac0a|forum post fc0237a39b30ac0a]. FossilOrigin-Name: 5204c2c4a7b73a64764b0d2d1d7c53709bb64e0d2685a829c7bf31af13bab5e7
This commit is contained in:
@@ -214,7 +214,8 @@
|
||||
#ifndef __has_extension
|
||||
# define __has_extension(x) 0 /* compatibility with non-clang compilers */
|
||||
#endif
|
||||
#if GCC_VERSION>=4007000 || __has_extension(c_atomic)
|
||||
#if GCC_VERSION>=4007000 || \
|
||||
(__has_extension(c_atomic) && __has_extension(c_atomic_store_n))
|
||||
# define AtomicLoad(PTR) __atomic_load_n((PTR),__ATOMIC_RELAXED)
|
||||
# define AtomicStore(PTR,VAL) __atomic_store_n((PTR),(VAL),__ATOMIC_RELAXED)
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user