Mutex Verification Routines
Mutex Verification Routines
#ifndef NDEBUG int sqlite3_mutex_held(sqlite3_mutex*); int sqlite3_mutex_notheld(sqlite3_mutex*); #endif
The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines are intended for use inside assert() statements. The SQLite core never uses these routines except inside an assert() and applications are advised to follow the lead of the core. The SQLite core only provides implementations for these routines when it is compiled with the SQLITE_DEBUG flag. External mutex implementations are only required to provide these routines if SQLITE_DEBUG is defined and if NDEBUG is not defined.
These routines should return true if the mutex in their argument is held or not held, respectively, by the calling thread.
The implementation is not required to provide versions of these routines that actually work. If the implementation does not provide working versions of these routines, it should at l