1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +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

@@ -13,7 +13,7 @@
** This file contains code use to implement APIs that are part of the
** VDBE.
**
** $Id: vdbeapi.c,v 1.143 2008/10/07 14:06:11 danielk1977 Exp $
** $Id: vdbeapi.c,v 1.144 2008/10/07 15:25:49 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@@ -202,7 +202,7 @@ int sqlite3_finalize(sqlite3_stmt *pStmt){
rc = SQLITE_OK;
}else{
Vdbe *v = (Vdbe*)pStmt;
#ifndef SQLITE_MUTEX_NOOP
#if SQLITE_THREADSAFE
sqlite3_mutex *mutex = v->db->mutex;
#endif
sqlite3_mutex_enter(mutex);
@@ -244,7 +244,7 @@ int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
int i;
int rc = SQLITE_OK;
Vdbe *p = (Vdbe*)pStmt;
#ifndef SQLITE_MUTEX_NOOP
#if SQLITE_THREADSAFE
sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
#endif
sqlite3_mutex_enter(mutex);