Name

sqlite3_mutex_held() — Test if a mutex lock is held

Definition

int sqlite3_mutex_held( sqlite3_mutex* mutex );
mutex

A mutual exclusion lock. If a NULL value is passed, the function should return true (nonzero).

Returns

A nonzero value if the given mutex is currently held, or a zero value if the mutex is not held.

Description

This function tests to see if the current thread holds the given mutual exclusion lock. The SQLite library only uses this function in assert() checks. Generally, this function is only available if SQLite is compiled while SQLITE_DEBUG is defined. Not all threading libraries supports this function. Unsupported platforms should always return true (nonzero).

Applications should limit use of this function to debug and verification code.

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.