| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | List of all members
erpc::Mutex Class Reference
Porting » Threads

Mutex. More...

`#include <erpc_threading.h>`

## Classes
class | Guard

## Public Member Functions
| Mutex (void)
| Constructor.
| ~Mutex (void)
| Destructor.
bool | tryLock (void)
| This function try lock mutex. More...
bool | lock (void)
| This function lock mutex. More...
bool | unlock (void)
| This function unlock mutex. More...

## Detailed Description

Mutex.

If the OS supports it, the mutex will be recursive.

## Member Function Documentation

bool Mutex::tryLock | ( | void |  | ) |

This function try lock mutex.

Return values

  true | When mutex locked successfully.
  false | When mutex didn't locked.

bool Mutex::lock | ( | void |  | ) |

This function lock mutex.

Return values

  true | When mutex locked successfully.
  false | When mutex didn't locked.

bool Mutex::unlock | ( | void |  | ) |

This function unlock mutex.

Return values

  true | When mutex unlocked successfully.
  false | When mutex didn't unlocked.

The documentation for this class was generated from the following files:

- erpc_threading.h
- erpc_threading_pthreads.cpp
- erpc_threading_win32.cpp