1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Improved memory barrier that should work with MinGW on older versions of

Windows.

FossilOrigin-Name: 47dc24bd1e8f76eb17ba53a883b8984b3e1b2934
This commit is contained in:
drh
2015-09-06 10:31:37 +00:00
parent 6081c1dbdf
commit 2d64034bc2
4 changed files with 17 additions and 12 deletions

View File

@@ -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
}