

#include <nitro/os.h>void OS_LockMutex( OSMutex* mutex );| mutex | Pointer to the OSMutex structure |
None.
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 the OS_LockMutex function is called is recorded, and mutex must be unlocked the same number of times to actually release it.
When the thread that is locking mutex is ended by the OS_ExitThread function, that mutex is automatically unlocked.
OS_InitMutex
OS_UnlockMutex
OS_TryLockMutex
OS_ExitThread
2004/04/05 Added that the OS_ExitThread function will unlock mutexes.
2003/12/01 Initial version.
CONFIDENTIAL