aboutsummaryrefslogtreecommitdiff
path: root/src/mutex.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-09-06 02:51:04 +0000
committerdrh <drh@noemail.net>2015-09-06 02:51:04 +0000
commit6081c1dbdf7730752bbde89ebb17d01bb30bf8f0 (patch)
treee82661b7eaaab7bde1934ddb05ecd9cdd9a2da60 /src/mutex.c
parent0b8d255c37ea9830cecabb57f1c2ba6305eacc44 (diff)
downloadsqlite-6081c1dbdf7730752bbde89ebb17d01bb30bf8f0.tar.gz
sqlite-6081c1dbdf7730752bbde89ebb17d01bb30bf8f0.zip
Add a memory barrier to the mutex initialization logic, try to work around
an issue reported by WebKit. FossilOrigin-Name: 11a9a786ec06403addb47f5c6fb142b382fae522
Diffstat (limited to 'src/mutex.c')
-rw-r--r--src/mutex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mutex.c b/src/mutex.c
index 64efd3b05..a2e4e6387 100644
--- a/src/mutex.c
+++ b/src/mutex.c
@@ -53,6 +53,7 @@ int sqlite3MutexInit(void){
pTo->xMutexLeave = pFrom->xMutexLeave;
pTo->xMutexHeld = pFrom->xMutexHeld;
pTo->xMutexNotheld = pFrom->xMutexNotheld;
+ sqlite3MemoryBarrier();
pTo->xMutexAlloc = pFrom->xMutexAlloc;
}
rc = sqlite3GlobalConfig.mutex.xMutexInit();