1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

When the in single-threaded mode, the sqlite3_mutex_alloc() interface

still returns a non-NULL value.  The mutex doesn't do anything, but it
tests non-NULL.  This way, extensions (or VFSes) that use sqlite3_mutex_alloc()
can tell the difference between an OOM error and mutexes being disabled.

FossilOrigin-Name: 451fd175758983c335aab449fdc4cb838156c4cb
This commit is contained in:
drh
2010-05-05 00:05:24 +00:00
parent 7721b23e0a
commit 92d7652379
5 changed files with 46 additions and 33 deletions

View File

@@ -2537,6 +2537,7 @@ const sqlite3_mem_methods *sqlite3MemGetMemsys5(void);
#ifndef SQLITE_MUTEX_OMIT
sqlite3_mutex_methods *sqlite3DefaultMutex(void);
sqlite3_mutex_methods *sqlite3NoopMutex(void);
sqlite3_mutex *sqlite3MutexAlloc(int);
int sqlite3MutexInit(void);
int sqlite3MutexEnd(void);