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/random.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/random.c')
-rw-r--r-- | src/random.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/random.c b/src/random.c index c3e425e42..7fe42a557 100644 --- a/src/random.c +++ b/src/random.c @@ -15,7 +15,7 @@ ** Random numbers are used by some of the database backends in order ** to generate random integer keys for tables or random filenames. ** -** $Id: random.c,v 1.26 2008/09/02 00:52:52 drh Exp $ +** $Id: random.c,v 1.27 2008/10/07 15:25:48 drh Exp $ */ #include "sqliteInt.h" @@ -106,7 +106,7 @@ static int randomByte(void){ */ void sqlite3_randomness(int N, void *pBuf){ unsigned char *zBuf = pBuf; -#ifndef SQLITE_MUTEX_NOOP +#if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG); #endif sqlite3_mutex_enter(mutex); |