summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/src/mutex_unix.c
diff options
context:
space:
mode:
authorjturner <jturner@openbsd.org>2015-12-23 20:07:36 +0000
committerjturner <jturner@openbsd.org>2015-12-23 20:07:36 +0000
commit454f2601b89e8c6c8f927b542b09b36ffb6763a8 (patch)
tree3aeb7f1535c5a957952029d1542c4f4ecd85a695 /lib/libsqlite3/src/mutex_unix.c
parentDo undo. (diff)
downloadwireguard-openbsd-454f2601b89e8c6c8f927b542b09b36ffb6763a8.tar.xz
wireguard-openbsd-454f2601b89e8c6c8f927b542b09b36ffb6763a8.zip
Update sqlite3 to 3.9.2. Bump major, regen .pc and header. Changes
available here: http://sqlite.org/changes.html Tested in bulk by aja@. ok landry@
Diffstat (limited to 'lib/libsqlite3/src/mutex_unix.c')
-rw-r--r--lib/libsqlite3/src/mutex_unix.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libsqlite3/src/mutex_unix.c b/lib/libsqlite3/src/mutex_unix.c
index 0a493fa6a7c..dbdaa225b3e 100644
--- a/lib/libsqlite3/src/mutex_unix.c
+++ b/lib/libsqlite3/src/mutex_unix.c
@@ -81,6 +81,19 @@ static int pthreadMutexNotheld(sqlite3_mutex *p){
#endif
/*
+** 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)
+ SQLITE_MEMORY_BARRIER;
+#elif defined(__GNUC__) && GCC_VERSION>=4001000
+ __sync_synchronize();
+#endif
+}
+
+/*
** Initialize and deinitialize the mutex subsystem.
*/
static int pthreadMutexInit(void){ return SQLITE_OK; }