mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Use the GCC built-in __sync_fetch_and_sub() to make the sqlite3StatusDown()
routine atomic, and thereby avoid some mutexing. FossilOrigin-Name: f69ce75b3d94331fdbfa2f3a27d61db24c285d2b
This commit is contained in:
@@ -228,6 +228,15 @@
|
||||
# define SQLITE_NOINLINE
|
||||
#endif
|
||||
|
||||
/*
|
||||
** The SQLITE_ATOMIC_STATUS_DOWN macro is defined if and only if
|
||||
** the sqlite3StatusDown() function is threadsafe.
|
||||
*/
|
||||
#if !defined(SQLITE_DISABLE_INTRINSIC) \
|
||||
&& defined(__GNUC__) && GCC_VERSION>=4004000
|
||||
# define SQLITE_ATOMIC_STATUS_DOWN 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Make sure that the compiler intrinsics we desire are enabled when
|
||||
** compiling with an appropriate version of MSVC unless prevented by
|
||||
|
Reference in New Issue
Block a user