mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add requirements marks and make minor tweaks to documentation.
FossilOrigin-Name: 49188b2bb53a92b0b0b6aaf8247edeb0c1bcd1f5
This commit is contained in:
15
src/main.c
15
src/main.c
@@ -329,15 +329,17 @@ int sqlite3_config(int op, ...){
|
||||
switch( op ){
|
||||
|
||||
/* Mutex configuration options are only available in a threadsafe
|
||||
** compile.
|
||||
** compile.
|
||||
*/
|
||||
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0
|
||||
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-54466-46756 */
|
||||
case SQLITE_CONFIG_SINGLETHREAD: {
|
||||
/* Disable all mutexing */
|
||||
sqlite3GlobalConfig.bCoreMutex = 0;
|
||||
sqlite3GlobalConfig.bFullMutex = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-20520-54086 */
|
||||
case SQLITE_CONFIG_MULTITHREAD: {
|
||||
/* Disable mutexing of database connections */
|
||||
/* Enable mutexing of core data structures */
|
||||
@@ -345,17 +347,23 @@ int sqlite3_config(int op, ...){
|
||||
sqlite3GlobalConfig.bFullMutex = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-59593-21810 */
|
||||
case SQLITE_CONFIG_SERIALIZED: {
|
||||
/* Enable all mutexing */
|
||||
sqlite3GlobalConfig.bCoreMutex = 1;
|
||||
sqlite3GlobalConfig.bFullMutex = 1;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-63666-48755 */
|
||||
case SQLITE_CONFIG_MUTEX: {
|
||||
/* Specify an alternative mutex implementation */
|
||||
sqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-14450-37597 */
|
||||
case SQLITE_CONFIG_GETMUTEX: {
|
||||
/* Retrieve the current mutex implementation */
|
||||
*va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;
|
||||
@@ -363,7 +371,6 @@ int sqlite3_config(int op, ...){
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
case SQLITE_CONFIG_MALLOC: {
|
||||
/* Specify an alternative malloc implementation */
|
||||
sqlite3GlobalConfig.m = *va_arg(ap, sqlite3_mem_methods*);
|
||||
@@ -377,7 +384,7 @@ int sqlite3_config(int op, ...){
|
||||
}
|
||||
case SQLITE_CONFIG_MEMSTATUS: {
|
||||
/* Enable or disable the malloc status collection */
|
||||
sqlite3GlobalConfig.bMemstat = va_arg(ap, int);
|
||||
sqlite3GlobalConfig.bMemstat = va_arg(ap, int); /* IMP: R-27464-47829 */
|
||||
break;
|
||||
}
|
||||
case SQLITE_CONFIG_SCRATCH: {
|
||||
|
Reference in New Issue
Block a user