SQLite

Check-in [5204c2c4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More detailed compile-time testing before attempting to use atomic load intrinsics. See forum post fc0237a39b30ac0a.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5204c2c4a7b73a64764b0d2d1d7c53709bb64e0d2685a829c7bf31af13bab5e7
User & Date: drh 2021-01-09 18:24:33
References
2021-07-05
17:15
Revert [5204c2c4a7b73a64], restoring the old pre-processor logic for determining the availability of the __atomic_store_n()/__atomic_load_n() primitives. (check-in: e690abb9 user: dan tags: trunk)
Context
2021-01-09
19:10
New CLI command: ".stats vmstep" enables the display of the virtual-machine step count only, after each command. Useful for optimization problems. (check-in: 49dfce46 user: drh tags: trunk)
18:24
More detailed compile-time testing before attempting to use atomic load intrinsics. See forum post fc0237a39b30ac0a. (check-in: 5204c2c4 user: drh tags: trunk)
2021-01-08
19:53
Fix an issue with sha3_query() when the first argument contains blank SQL statements. (check-in: 24baab9a user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

210
211
212
213
214
215
216
217

218
219
220
221
222
223
224
/*
** WAL mode depends on atomic aligned 32-bit loads and stores in a few
** places.  The following macros try to make this explicit.
*/
#ifndef __has_extension
# define __has_extension(x) 0     /* compatibility with non-clang compilers */
#endif
#if GCC_VERSION>=4007000 || __has_extension(c_atomic)

# define AtomicLoad(PTR)       __atomic_load_n((PTR),__ATOMIC_RELAXED)
# define AtomicStore(PTR,VAL)  __atomic_store_n((PTR),(VAL),__ATOMIC_RELAXED)
#else
# define AtomicLoad(PTR)       (*(PTR))
# define AtomicStore(PTR,VAL)  (*(PTR) = (VAL))
#endif








|
>







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/*
** WAL mode depends on atomic aligned 32-bit loads and stores in a few
** places.  The following macros try to make this explicit.
*/
#ifndef __has_extension
# define __has_extension(x) 0     /* compatibility with non-clang compilers */
#endif
#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
# define AtomicLoad(PTR)       (*(PTR))
# define AtomicStore(PTR,VAL)  (*(PTR) = (VAL))
#endif