]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add the experimental sqlite3_threadsafe() API. (CVS 4350)
authordrh <drh@noemail.net>
Thu, 30 Aug 2007 20:09:48 +0000 (20:09 +0000)
committerdrh <drh@noemail.net>
Thu, 30 Aug 2007 20:09:48 +0000 (20:09 +0000)
FossilOrigin-Name: 1b39a714efbe1f4ccc8daf68a227a8c9b84a388f

manifest
manifest.uuid
src/main.c
src/sqlite.h.in

index 447d752294ca068bfbb7a4318803a92024d50317..c1f4fec9de8134a5baa5f9edee7ca98ec9e23515 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sthe\sloadable\sextension\smodule\sso\sthat\sit\swill\scompile\swith\nSQLITE_THREADSAFE=0.\s(CVS\s4349)
-D 2007-08-30T20:09:28
+C Add\sthe\sexperimental\ssqlite3_threadsafe()\sAPI.\s(CVS\s4350)
+D 2007-08-30T20:09:48
 F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -99,7 +99,7 @@ F src/journal.c 573911e274738b3fda813d4f0a6e319f8a9ecd36
 F src/legacy.c 4ac53191fad2e3c4d59bde1228879b2dc5a96d66
 F src/limits.h 71ab25f17e35e0a9f3f6f234b8ed49cc56731d35
 F src/loadext.c 9e6bbbc0955c882a2ef11c88d6a0896d2e7b02a4
-F src/main.c 9276bbdc90d17cd8b15c4cb227dc09c968779391
+F src/main.c 80ebc68e5a270e55b06b233ac475b6c56b11ec17
 F src/malloc.c de4e77fe70a9a0ac47a1c3a874422b107231bf31
 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
 F src/mem1.c afe2fbf6d7e8247c6c9f69c1481358b1cad60c08
@@ -130,7 +130,7 @@ F src/random.c 4a22746501bf36b0a088c66e38dde5daba6a35da
 F src/select.c e5cc50e8d22b2490c4fb47f2ef08a9b43bcb52d9
 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c ac29402b538515fa4697282387be9c1205e6e9eb
-F src/sqlite.h.in cc69ce66ee2b9d9bf2637ae4769d1c4891e1a0d1
+F src/sqlite.h.in b4cca54d8c3aa61c033dcb0d48f11ebcdb354627
 F src/sqlite3ext.h 3e5368b64a28602ef8abf9cfb6c8c1643903f238
 F src/sqliteInt.h 5dbb7a934a88dfa9893e2627f4821b0464f5edc0
 F src/sqliteLimit.h 1bcbbdfa856f8b71b561abb31edb864b0eca1d12
@@ -568,7 +568,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 65c62ed85edd2cb3cf26f01fadf3b342c1e8a20f
-R 24707d1f16c4f01b815be9447025b12b
+P a73a8b50f76f4f948a4080070ac2354d8ea05515
+R c4d79d2cd68f00b0062f4ecfacc90065
 U drh
-Z 13c6d55075c5cdd960d7fb6e3991b863
+Z 40195c533200bec4568da6a8f5f748e2
index eaa4acff40270e09c2d2d34dd31b324abc7402d1..004923f433ce3848c250214699b9cbde74b699e1 100644 (file)
@@ -1 +1 @@
-a73a8b50f76f4f948a4080070ac2354d8ea05515
\ No newline at end of file
+1b39a714efbe1f4ccc8daf68a227a8c9b84a388f
\ No newline at end of file
index dc462aa257383b981cfb3b5e07325461346093af..eda460fd84adc197eeb0ceb62b575e85a5c3a261 100644 (file)
@@ -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.399 2007/08/30 16:23:19 drh Exp $
+** $Id: main.c,v 1.400 2007/08/30 20:09:48 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -25,6 +25,7 @@
 const char sqlite3_version[] = SQLITE_VERSION;
 const char *sqlite3_libversion(void){ return sqlite3_version; }
 int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
+int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
 
 /*
 ** If the following function pointer is not NULL and if
index e0b3897ac52b8c44417f1fa8da065ce0a41f22aa..780fb87bc3bf4c7e6fef55ec9ad4454c6d699468 100644 (file)
@@ -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.250 2007/08/30 16:23:19 drh Exp $
+** @(#) $Id: sqlite.h.in,v 1.251 2007/08/30 20:09:48 drh Exp $
 */
 #ifndef _SQLITE3_H_
 #define _SQLITE3_H_
@@ -112,6 +112,30 @@ SQLITE_EXTERN const char sqlite3_version[];
 const char *sqlite3_libversion(void);
 int sqlite3_libversion_number(void);
 
+/*
+** CAPI3REF: Test To See If The Library Is Threadsafe
+**
+** This routine returns TRUE (nonzero) if SQLite was compiled with
+** all of its mutexes enabled and is thus threadsafe.  It returns
+** zero if the particular build is for single-threaded operation
+** only.
+**
+** Really all this routine does is return true if SQLite was compiled
+** with the -DSQLITE_THREADSAFE=1 option and false if
+** compiled with -DSQLITE_THREADSAFE=0.  If SQLite uses an
+** application-defined mutex subsystem, malloc subsystem, collating
+** sequence, VFS, SQL function, progress callback, commit hook,
+** extension, or other accessories and these add-ons are not
+** threadsafe, then clearly the combination will not be threadsafe
+** either.  Hence, this routine never reports that the library
+** is guaranteed to be threadsafe, only when it is guaranteed not
+** to be.
+**
+** This is an experimental API and may go away or change in future
+** releases.
+*/
+int sqlite3_threadsafe(void);
+
 /*
 ** CAPI3REF: Database Connection Handle
 **