1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

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
This commit is contained in:
drh
2008-10-07 15:25:48 +00:00
parent 3d9cf5177f
commit 18472fa7b8
24 changed files with 322 additions and 242 deletions

View File

@@ -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);