IPC object that offers the functionality of a mutex, implemented by means of the pthread mutex API.
More...
#include <mutex.h>
|
| virtual bool | Init () |
| | Initializes the object without locking the mutex. More...
|
| |
| bool | Init (bool initial_owner) |
| | Initializes the object. More...
|
| |
| virtual WaitResult | Wait (int time_out=-1) |
| | Performs a wait operation with the object to get it. More...
|
| |
| virtual bool | Dispose () |
| | Release the resources associated to the IPC object and sets the internal status to false. More...
|
| |
| bool | Release () |
| | Releases/unlocks the mutex. More...
|
| |
| | IPCObject () |
| | Initializes the internal status to false. More...
|
| |
| bool | IsValid () |
| | Returns true if the object is valid, that is, the internal status value is true. More...
|
| |
| virtual | ~IPCObject () |
| | The desctructor calls the method Dispose. More...
|
| |
IPC object that offers the functionality of a mutex, implemented by means of the pthread mutex API.
- See also
- IPCObject
Pointer to a Mutex object.
| bool ipc::Mutex::Dispose |
( |
| ) |
|
|
virtual |
Release the resources associated to the IPC object and sets the internal status to false.
- Returns
true if successful.
Reimplemented from ipc::IPCObject.
| virtual bool ipc::Mutex::Init |
( |
| ) |
|
|
inlinevirtual |
Initializes the object without locking the mutex.
- Returns
true if successful.
Reimplemented from ipc::IPCObject.
| bool ipc::Mutex::Init |
( |
bool |
initial_owner | ) |
|
Initializes the object.
- Parameters
-
| initial_owner | If true the mutex is locked. |
- Returns
true if successful.
| bool ipc::Mutex::Release |
( |
| ) |
|
Releases/unlocks the mutex.
- Returns
true if successful.
Performs a wait operation with the object to get it.
- Parameters
-
| time_out | Time out (infinite by default). |
- Returns
WAIT_OBJECT if successful, WAIT_TIMEOUT if time out or WAIT_ERROR is error.
Reimplemented from ipc::IPCObject.
| pthread_t ipc::Mutex::locker |
|
private |
Id. of the thread that locks the mutex.
| pthread_mutex_t ipc::Mutex::mutex |
|
private |
The documentation for this class was generated from the following files: