aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-06-17 18:57:49 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-06-17 18:57:49 +0000
commitb2e36222afe9183acdb96e09cd0ce4538d72992b (patch)
treeb40ee23aaacae6001e757027680738ed3cec8286 /src/main.c
parent6d2ab0e4318e293000c42fb667bf0a16a198ce0e (diff)
downloadsqlite-b2e36222afe9183acdb96e09cd0ce4538d72992b.tar.gz
sqlite-b2e36222afe9183acdb96e09cd0ce4538d72992b.zip
Add the SQLITE_CONFIG_MUTEX symbol for use with sqlite3_config(). (CVS 5228)
FossilOrigin-Name: af1835bb5f5e3fb78d782c7c287e20db169e883f
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);