#include <CriticalSection.h>
|
Open an existing named mutex
- Returns
- false if mutex does not exists.
|
bool | create (const AChar *name) |
|
bool | open (const AChar *name) |
|
bool | lock () |
|
bool | try_lock () |
|
bool | lock (const TimePeriod &timeout) |
|
bool | unlock () |
|
bool | is_ok () |
|
System independant Mutex management
commore::Mutex::Mutex |
( |
| ) |
|
commore::Mutex::Mutex |
( |
const AChar * |
name, |
|
|
bool |
create |
|
) |
| |
Create a named mutex
- Parameters
-
mutex | name |
create | if false does not create mutex |
bool commore::Mutex::is_ok |
( |
| ) |
|
- Returns
- true if mutex exists
bool commore::Mutex::lock |
( |
| ) |
|
Lock mutex (wait until mutex become free)
- Returns
- false if mutex not reated
bool commore::Mutex::lock |
( |
const TimePeriod & |
timeout | ) |
|
Try lock mutex with timeout
- Returns
- true if lock succed
bool commore::Mutex::try_lock |
( |
| ) |
|
Try lock mutex (does not wait )
- Returns
- true if lock succed
bool commore::Mutex::unlock |
( |
| ) |
|
Release mutex
- Returns
- false if mutex does not exist
The documentation for this class was generated from the following file: