sqlite3_mutex* sqlite3_mutex_alloc( int type );
type
The desired type of mutual exclusion lock.
A newly allocated and initialized mutual exclusion lock.
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().