aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 803c0ec4b..af2576e45 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.445 2008/06/16 20:51:16 drh Exp $
+** $Id: main.c,v 1.446 2008/06/17 18:57:49 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -76,9 +76,7 @@ int sqlite3_initialize(void){
if( sqlite3IsInit ) return SQLITE_OK;
rc = sqlite3_mutex_init();
if( rc==SQLITE_OK ){
-#ifndef SQLITE_MUTEX_NOOP
sqlite3_mutex *pMutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
-#endif
sqlite3_mutex_enter(pMutex);
if( sqlite3IsInit==0 ){
sqlite3IsInit = 1;
@@ -153,6 +151,11 @@ int sqlite3_config(int op, ...){
sqlite3Config.m = *va_arg(ap, sqlite3_mem_methods*);
break;
}
+ case SQLITE_CONFIG_MUTEX: {
+ /* Specify an alternative mutex implementation */
+ sqlite3Config.mutex = *va_arg(ap, sqlite3_mutex_methods*);
+ break;
+ }
case SQLITE_CONFIG_MEMSTATUS: {
/* Enable or disable the malloc status collection */
sqlite3Config.bMemstat = va_arg(ap, int);