# OS_TryLockMutex

## Syntax

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

## Arguments

mutex | Pointer to the `OSMutex` structure

## Return Values

Returns TRUE when `mutex` is locked. Otherwise returns FALSE.

## Description

The calling thread attempts to lock mutex.

If the mutex cannot be locked, the function returns `FALSE`. If the thread is able to lock the mutex, this function performs processing conforming to `OS_LockMutex()`.

## See Also

`OS_InitMutex, OS_LockMutex, OS_UnlockMutex`

## Revision History

2003/12/01 Initial version.

CONFIDENTIAL