diff options
Diffstat (limited to 'src/mutex_unix.c')
-rw-r--r-- | src/mutex_unix.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mutex_unix.c b/src/mutex_unix.c index e181ba5bd..78fba1d81 100644 --- a/src/mutex_unix.c +++ b/src/mutex_unix.c @@ -84,11 +84,10 @@ static int pthreadMutexNotheld(sqlite3_mutex *p){ ** Try to provide a memory barrier operation, needed for initialization only. */ void sqlite3MemoryBarrier(void){ -#if defined(__GNUC__) - __sync_synchronize(); -#endif -#ifdef SQLITE_MEMORY_BARRIER +#if defined(SQLITE_MEMORY_BARRIER) SQLITE_MEMORY_BARRIER; +#elif defined(__GNUC__) + __sync_synchronize(); #endif } |