Name
sqlite3_mutex_alloc() — Allocate a new mutex lock
Definition
sqlite3_mutex* sqlite3_mutex_alloc( int type );
-
type The desired type of mutual exclusion lock.
- Returns
A newly allocated and initialized mutual exclusion lock.
Description
This function allocates and initializes a new mutual exclusion
lock of the requested type. Applications can request an SQLITE_MUTEX_RECURSIVE or
SQLITE_MUTEX_FAST lock.
A recursive lock must support and properly reference-count
multiple enter/leave calls by the same thread. A fast mutex does
not need to support anything other than simple enter/leave
semantics. Depending on the threading library, a fast lock may
not actually be any faster than a recursive lock.
Any application mutex acquired through sqlite3_mutex_alloc() should eventually be
freed with sqlite3_mutex_free().
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access