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
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.