diff options
author | drh <drh@noemail.net> | 2008-10-07 15:25:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-10-07 15:25:48 +0000 |
commit | 18472fa7b80fffe589ac558e25d84b3969a70e70 (patch) | |
tree | 1dda54476935c3056b2946b3a7e77e32c4c4a2cf /src/os.c | |
parent | 3d9cf5177f663bfa87736745f4eb8b93bc883d8a (diff) | |
download | sqlite-18472fa7b80fffe589ac558e25d84b3969a70e70.tar.gz sqlite-18472fa7b80fffe589ac558e25d84b3969a70e70.zip |
Remove the SQLITE_MUTEX_APPDEF compile-time option. The SQLITE_THREADSAFE=0
option always removes all mutex code. For application-defined mutexes only,
use SQLITE_THREADSAFE=1 with SQLITE_MUTEX_NOOP=1. Ticket #3421. (CVS 5779)
FossilOrigin-Name: 02a12eb1cfe9307c66556105a1a99d657cc01ab5
Diffstat (limited to 'src/os.c')
-rw-r--r-- | src/os.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13,7 +13,7 @@ ** This file contains OS interface code that is common to all ** architectures. ** -** $Id: os.c,v 1.123 2008/09/23 16:41:30 danielk1977 Exp $ +** $Id: os.c,v 1.124 2008/10/07 15:25:48 drh Exp $ */ #define _SQLITE_OS_C_ 1 #include "sqliteInt.h" @@ -199,14 +199,14 @@ static sqlite3_vfs * SQLITE_WSD vfsList = 0; */ sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){ sqlite3_vfs *pVfs = 0; -#ifndef SQLITE_MUTEX_NOOP +#if SQLITE_THREADSAFE sqlite3_mutex *mutex; #endif #ifndef SQLITE_OMIT_AUTOINIT int rc = sqlite3_initialize(); if( rc ) return 0; #endif -#ifndef SQLITE_MUTEX_NOOP +#if SQLITE_THREADSAFE mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); #endif sqlite3_mutex_enter(mutex); @@ -268,7 +268,7 @@ int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ ** Unregister a VFS so that it is no longer accessible. */ int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ -#ifndef SQLITE_MUTEX_NOOP +#if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); #endif sqlite3_mutex_enter(mutex); |