-C Add\sthe\ssqlite3_next_stmt()\sinterface,\sincluding\stest\scases.\s(CVS\s5243)
-D 2008-06-19T02:52:25
+C Shuffle\ssome\sof\sthe\smutex\srelated\sdocumentation\sin\ssqlite.h.in\sto\smatch\sthe\snew\ssqlite3_mutex_methods\sbased\sAPI.\s(CVS\s5244)
+D 2008-06-19T08:51:24
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in ff6f90048555a0088f6a4b7406bed5e55a7c4eff
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/mem3.c 28b4812b87470a00b11821fb5850e7cabcce06c6
F src/mem4.c 6703adb1717b26d9d70a1c2586b4b7b7ffee7909
F src/mem5.c ad31a0a481b86b86f4ac0b6d952e69727d4e113a
-F src/mutex.c 67393ac4e82d2ff09622ec33b9f289deb9d8825e
+F src/mutex.c a485a0eac8ee2cd95f66e565b4c6696c18db968f
F src/mutex.h 236677b27760d85701b5872d01b5cafedde5f0a9
-F src/mutex_os2.c d9eb88ad198c59f1a45d90b597c258562a40e52c
-F src/mutex_unix.c 469a35c105435794375d683f75cad9e848817d19
-F src/mutex_w32.c e03baa369c5e8e7ea4dd2e5b3d098e047f7a2f06
+F src/mutex_os2.c 7c948174d31e06df3e3dd0ef734691e95e30a5f4
+F src/mutex_unix.c 630a3860703ebcda94e99d179dc4ef4824489470
+F src/mutex_w32.c 36841fbd4450bf5b9dd5b065f2b614d3b50c7021
F src/os.c e9f37351dc4aacc4861f0adbe463f21c8f5969fa
F src/os.h c9a7f94e80193fd4cf27f5c5698eb56753f1b05a
F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
F src/random.c 5c754319d38abdd6acd74601ee0105504adc508a
F src/select.c 669687459e7d0193c89de06c5dbed55b4a41191c
F src/shell.c a12ea645271b7876c8f080146f48e20b00d367ec
-F src/sqlite.h.in 2590420afe3c9c5a05ee7269f32c3c6f4b06c053
+F src/sqlite.h.in cc64323ecc21320692c12726102976689ee5ae53
F src/sqlite3ext.h faacd0e6a81aabee0861c6d7883c9172e74ef5b3
F src/sqliteInt.h 6dd55232e738a4dac23475cd4b0e444dff75c896
F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8
F src/test_loadext.c 22065d601a18878e5542191001f0eaa5d77c0ed8
F src/test_malloc.c dc6d256544b1be96312367b24b93a778de8afdfe
F src/test_md5.c 28209a4e2068711b5443c33104fe41f21d160071
-F src/test_mutex.c 08640d7547bfadb6997a22d72e63914feaf4bc4f
+F src/test_mutex.c 8cfe5c56d5583e07c25c50f59c42ca0104dd24bb
F src/test_onefile.c 1f87d4a21cbfb24a7c35e4333fa0bd34d641f68d
F src/test_osinst.c 867f1317bd135f942a63eab5a78da40fc70d1493
F src/test_schema.c e3f93725f7c5b2cff84a69dc4332040dfbc8f81a
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P eec9a54dc3554a00ea69fc8e26d205f30a3bcabd
-R c8ee455d2762ac91cbcc6d328820d18d
-U drh
-Z 1aaf0ee87bfe5a8385c7655d6421e7d4
+P 565a530896b40790287eeaad709edd51980fbddf
+R 950854b62a7a587d35382e80a0549a75
+U danielk1977
+Z 2b8089afd328ee7a65250c0132b39dd9
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
-** @(#) $Id: sqlite.h.in,v 1.338 2008/06/19 02:52:25 drh Exp $
+** @(#) $Id: sqlite.h.in,v 1.339 2008/06/19 08:51:24 danielk1977 Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
** CAPI3REF: Mutexes {F17000}
**
** The SQLite core uses these routines for thread
-** synchronization. Though they are intended for internal
+** synchronization. Though they are intended for internal
** use by SQLite, code that links against SQLite is
** permitted to use any of these routines.
**
**
** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
-** implementation is included with the library. The
-** mutex interface routines defined here become external
-** references in the SQLite library for which implementations
-** must be provided by the application. This facility allows an
-** application that links against SQLite to provide its own mutex
-** implementation without having to modify the SQLite core.
-**
-** {F17001} The sqlite3_mutex_init() routine is called once by each
-** effective call to [sqlite3_initialize()]. The sqlite3_mutex_init()
-** interface initializes the mutex subsystem. The application should
-** never call sqlite3_mutex_init() directly but only indirectly by
-** invoking [sqlite3_initialize()].
-**
-** {F17003} The sqlite3_mutex_end() routine undoes the effect of
-** sqlite3_mutex_init(). The sqlite3_mutex_end() interface is called
-** by [sqlite3_shutdown()]. The application should never call
-** sqlite3_mutex_end() directly but only indirectly through
-** [sqlite3_shutdown()].
+** implementation is included with the library. In this case the
+** application must supply a custom mutex implementation using the
+** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
+** before calling sqlite3_initialize() or any other public sqlite3_
+** function that calls sqlite3_initialize().
**
** {F17011} The sqlite3_mutex_alloc() routine allocates a new
** mutex and returns a pointer to it. {F17012} If it returns NULL
** CAPI3REF: Mutex Methods Object {F17120}
**
** An instance of this structure defines the low-level routines
-** used to allocate and use mutexes. This structure is used as
-** an argument to the [SQLITE_CONFIG_MUTEX] and [SQLITE_CONFIG_GETMUTEX]
-** options of [sqlite3_config()]. The methods defined by this
-** structure implement the following interfaces (respectively):
+** used to allocate and use mutexes.
+**
+** Usually, the default mutex implementations provided by SQLite are
+** sufficient, however the user has the option of substituting a custom
+** implementation for specialized deployments or systems for which SQLite
+** does not provide a suitable implementation. In this case, the user
+** creates and populates an instance of this structure to pass
+** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
+** Additionally, an instance of this structure can be used as an
+** output variable when querying the system for the current mutex
+** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
+**
+** The xMutexInit method defined by this structure is invoked as
+** part of system initialization by the sqlite3_initialize() function.
+** {F17001} The xMutexInit routine shall be called by SQLite once for each
+** effective call to [sqlite3_initialize()].
+**
+** The xMutexEnd method defined by this structure is invoked as
+** part of system shutdown by the sqlite3_shutdown() function. The
+** implementation of this method is expected to release all outstanding
+** resources obtained by the mutex methods implementation, especially
+** those obtained by the xMutexInit method. {F17003} The xMutexEnd()
+** interface shall be invoked once for each call to [sqlite3_shutdown()].
+**
+** The remaining seven methods defined by this structure (xMutexAlloc,
+** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
+** xMutexNotheld) implement the following interfaces (respectively):
**
** <ul>
-** <li> [sqlite3_mutex_init()] </li>
-** <li> [sqlite3_mutex_alloc()] </li>
-** <li> [sqlite3_mutex_free()] </li>
-** <li> [sqlite3_mutex_enter()] </li>
-** <li> [sqlite3_mutex_try()] </li>
-** <li> [sqlite3_mutex_leave()] </li>
-** <li> [sqlite3_mutex_end()] </li>
-** <li> [sqlite3_mutex_held()] </li>
-** <li> [sqlite3_mutex_notheld()] </li>
+** <li> [sqlite3_mutex_alloc()] </li>
+** <li> [sqlite3_mutex_free()] </li>
+** <li> [sqlite3_mutex_enter()] </li>
+** <li> [sqlite3_mutex_try()] </li>
+** <li> [sqlite3_mutex_leave()] </li>
+** <li> [sqlite3_mutex_held()] </li>
+** <li> [sqlite3_mutex_notheld()] </li>
** </ul>
+**
+** The only difference is that the public sqlite3_XXX functions enumerated
+** above silently ignore any invocations that pass a NULL pointer instead
+** of a valid mutex handle. The implementations of the methods defined
+** by this structure are not required to handle this case, the results
+** of passing a NULL pointer instead of a valid mutex handle are undefined
+** (i.e. it is acceptable to provide an implementation that segfaults if
+** it is passed a NULL pointer).
*/
typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
struct sqlite3_mutex_methods {
int (*xMutexInit)(void);
+ int (*xMutexEnd)(void);
sqlite3_mutex *(*xMutexAlloc)(int);
void (*xMutexFree)(sqlite3_mutex *);
void (*xMutexEnter)(sqlite3_mutex *);
int (*xMutexTry)(sqlite3_mutex *);
void (*xMutexLeave)(sqlite3_mutex *);
- int (*xMutexEnd)(void);
int (*xMutexHeld)(sqlite3_mutex *);
int (*xMutexNotheld)(sqlite3_mutex *);
};