aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c9
-rw-r--r--src/sqlite.h.in13
2 files changed, 20 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index b0efd48b5..e3754b803 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.509 2008/10/30 15:03:16 drh Exp $
+** $Id: main.c,v 1.510 2008/11/04 13:46:28 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -416,6 +416,13 @@ static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
}
/*
+** Return the mutex associated with a database connection.
+*/
+sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
+ return db->mutex;
+}
+
+/*
** Configuration settings for an individual database connection
*/
int sqlite3_db_config(sqlite3 *db, int op, ...){
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 51b512502..3ee2d13b4 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -30,7 +30,7 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
-** @(#) $Id: sqlite.h.in,v 1.406 2008/10/30 15:03:16 drh Exp $
+** @(#) $Id: sqlite.h.in,v 1.407 2008/11/04 13:46:28 drh Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
@@ -6260,6 +6260,17 @@ int sqlite3_mutex_notheld(sqlite3_mutex*);
#define SQLITE_MUTEX_STATIC_LRU2 7 /* lru page list */
/*
+** CAPI3REF: Retrieve the mutex for a database connection {H17002} <H17000>
+**
+** This interface returns a pointer the [sqlite3_mutex] object that
+** serializes access to the [database connection] given in the argument
+** when the [threading mode] is Serialized.
+** If the [threading mode] is Single-thread or Multi-thread then this
+** routine returns a NULL pointer.
+*/
+sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
+
+/*
** CAPI3REF: Low-Level Control Of Database Files {H11300} <S30800>
**
** {H11301} The [sqlite3_file_control()] interface makes a direct call to the