#include <nitro/os.h>
voidOS_LockMutex(OSMutex*mutex);
The calling thread tries to lock the mutex specified by mutex.
When mutex is being maintained by another thread, the
calling thread is temporarily stopped until mutex is
released. If mutex is being maintained in the
current thread, it returns immediately. However, the number of times OS_LockMutex()
is called is recorded, and mutex
must be unlocked the same number of times.
When the thread that locks mutex is terminated with
OS_ExitThread() that
mutex is automatically unlocked.
|
|
Pointer to the Mutex structure |
None
OS_InitMutex, OS_UnlockMutex, OS_TryLockMutex, OS_ExitThread
04/05/2004 Added description of mutex
unlock with OS_ExitThread().
12/01/2003 Initial Version