1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +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

@@ -81,7 +81,13 @@ static int winMutexNotheld(sqlite3_mutex *p){
** Try to provide a memory barrier operation, needed for initialization only.
*/
void sqlite3MemoryBarrier(void){
#if defined(SQLITE_MEMORY_BARRIER)
SQLITE_MEMORY_BARRIER;
#elif defined(__GNUC__)
__sync_synchronize();
#else
MemoryBarrier();
#endif
}
/*