1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Add the ATOMIC_INTRINSICS compile-time output output. Move sqlite3Int.h

in front of ctime.c so that default values that are not overridden are
shown in PRAGMA compile-time option output.

FossilOrigin-Name: e306952690bfb140e2c404a74b05ff2d070c487f7e52c62d62a004505fba0e15
This commit is contained in:
drh
2021-07-05 18:37:37 +00:00
parent 0f56f891dd
commit a612c1c9bc
6 changed files with 194 additions and 192 deletions

View File

@@ -215,9 +215,11 @@
# define __has_extension(x) 0 /* compatibility with non-clang compilers */
#endif
#if GCC_VERSION>=4007000 || __has_extension(c_atomic)
# define SQLITE_ATOMIC_INTRINSICS 1
# define AtomicLoad(PTR) __atomic_load_n((PTR),__ATOMIC_RELAXED)
# define AtomicStore(PTR,VAL) __atomic_store_n((PTR),(VAL),__ATOMIC_RELAXED)
#else
# define SQLITE_ATOMIC_INTRINSICS 0
# define AtomicLoad(PTR) (*(PTR))
# define AtomicStore(PTR,VAL) (*(PTR) = (VAL))
#endif