diff options
author | drh <drh@noemail.net> | 2015-09-24 12:40:43 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-24 12:40:43 +0000 |
commit | 22c733da644bcf8d614b7caf058c7a2b51286ab8 (patch) | |
tree | dd046b648e62af601cf481fb6cd79550f7dd2c06 /src/os_unix.c | |
parent | c5de2d0a0544294046414c432f88e8fda9b2bfa5 (diff) | |
download | sqlite-22c733da644bcf8d614b7caf058c7a2b51286ab8.tar.gz sqlite-22c733da644bcf8d614b7caf058c7a2b51286ab8.zip |
Strengthen the implementations of xShmMemoryBarrier on both the unix and
windows VFSes, so that they likely work even if SQLITE_THREADSAFE=0 is used.
FossilOrigin-Name: c6ab807b72ddfc1462f61aa91442b6fac04ace8a
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 53a4fd31b..fb2a8ca91 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4660,7 +4660,8 @@ static void unixShmBarrier( sqlite3_file *fd /* Database file holding the shared memory */ ){ UNUSED_PARAMETER(fd); - unixEnterMutex(); + sqlite3MemoryBarrier(); /* compiler-defined memory barrier */ + unixEnterMutex(); /* Also mutex, for redundancy */ unixLeaveMutex(); } |