/*
** 2012-01-30
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
*************************************************************************
**
** Mutex functions for LSM.
*/
/*
** Allocate a new mutex.
*/
int
/*
** Return a handle for one of the static mutexes.
*/
int
/*
** Free a mutex allocated by lsmMutexNew().
*/
void
/*
** Enter a mutex.
*/
void
/*
** Attempt to enter a mutex, but do not block. If successful, return zero.
** Otherwise, if the mutex is already held by some other thread and is not
** entered, return non zero.
**
** Each successful call to this function must be matched by a call to
** lsmMutexLeave().
*/
int
/*
** Leave a mutex.
*/
void
/*
** Return non-zero if the mutex passed as the second argument is held
** by the calling thread, or zero otherwise. If the implementation is not
** able to tell if the mutex is held by the caller, it should return
** non-zero.
**
** This function is only used as part of assert() statements.
*/
int
/*
** Return non-zero if the mutex passed as the second argument is not
** held by the calling thread, or zero otherwise. If the implementation
** is not able to tell if the mutex is held by the caller, it should
** return non-zero.
**
** This function is only used as part of assert() statements.
*/
int