diff options
author | drh <drh@noemail.net> | 2015-09-26 03:23:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-26 03:23:29 +0000 |
commit | 539482b76a3d005364d2668213b99d63f7521735 (patch) | |
tree | 649019fa2b6abf3e599b82cde83a2201e45906c2 /src | |
parent | 17db155fed685c0c1d3c438c3e0e02851722e83f (diff) | |
download | sqlite-539482b76a3d005364d2668213b99d63f7521735.tar.gz sqlite-539482b76a3d005364d2668213b99d63f7521735.zip |
Expand the header comment to clarify the purpose for the
sqlite3MemoryBarrier() function.
FossilOrigin-Name: b89495ae09aa0e9652475b2ba1943dfd87c73e07
Diffstat (limited to 'src')
-rw-r--r-- | src/mutex_unix.c | 4 | ||||
-rw-r--r-- | src/mutex_w32.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mutex_unix.c b/src/mutex_unix.c index cebb96c90..dbdaa225b 100644 --- a/src/mutex_unix.c +++ b/src/mutex_unix.c @@ -81,7 +81,9 @@ static int pthreadMutexNotheld(sqlite3_mutex *p){ #endif /* -** Try to provide a memory barrier operation, needed for initialization only. +** Try to provide a memory barrier operation, needed for initialization +** and also for the implementation of xShmBarrier in the VFS in cases +** where SQLite is compiled without mutexes. */ void sqlite3MemoryBarrier(void){ #if defined(SQLITE_MEMORY_BARRIER) diff --git a/src/mutex_w32.c b/src/mutex_w32.c index 90be07db2..7d28e4def 100644 --- a/src/mutex_w32.c +++ b/src/mutex_w32.c @@ -78,7 +78,9 @@ static int winMutexNotheld(sqlite3_mutex *p){ #endif /* -** Try to provide a memory barrier operation, needed for initialization only. +** Try to provide a memory barrier operation, needed for initialization +** and also for the xShmBarrier method of the VFS in cases when SQLite is +** compiled without mutexes (SQLITE_THREADSAFE=0). */ void sqlite3MemoryBarrier(void){ #if defined(SQLITE_MEMORY_BARRIER) |