# OS_InitMutex

## Syntax

  `#include <nitro/os.h>`
  `void OS_InitMutex( OSMutex* mutex );`

## Arguments

mutex | Pointer to `OSMutex` structure to be initialized

## Return Values

None.

## Description

This function initializes a `mutex`.

A `mutex` is used to synchronize threads. Operations are unpredictable when a `mutex` in use is initialized.

You need to initialize the `mutex` with this function before it can be locked by the `OS_LockMutex`, `OS_LockMutexR`, or `OS_LockMutexW` function.

## See Also

`OS_LockMutex
OS_UnlockMutex
OS_TryLockMutex`
`OS_LockMutexR
OS_LockMutexW
OS_UnlocMutexR
OS_UnlocMutexW
OS_TryLockMutexR
OS_TryLockMutexW
OS_LockMutexFromRToW
OS_LockMutexFromWToR
OS_TryLockMutexFromRToW
OS_TryLockMutexFromWToR`

## Revision History

2008/12/17 Added the read/write lock mutex functions to See Also.
2003/12/01 Initial version.

CONFIDENTIAL