Orocos Real-Time Toolkit
2.8.3
|
An object oriented wrapper around a recursive mutex. More...
#include <rtt/os/Mutex.hpp>
Public Member Functions | |
MutexRecursive () | |
Initialize a recursive Mutex. More... | |
virtual | ~MutexRecursive () |
Destroy a MutexRecursive. More... | |
void | lock () |
virtual void | unlock () |
virtual bool | trylock () |
Try to lock this mutex. More... | |
virtual bool | timedlock (Seconds s) |
Lock this mutex, but don't wait longer for the lock than the specified timeout. More... | |
Protected Attributes | |
rt_rec_mutex_t | recm |
An object oriented wrapper around a recursive mutex.
A mutex can only be unlock()'ed, by the thread which lock()'ed it. A trylock is a non blocking lock action which fails or succeeds.
|
inline |
Initialize a recursive Mutex.
Definition at line 217 of file Mutex.hpp.
References rtos_mutex_rec_init().
|
inlinevirtual |
Destroy a MutexRecursive.
If the MutexRecursive is still locked, the RTOS will not be asked to clean up its resources.
Definition at line 227 of file Mutex.hpp.
References rtos_mutex_rec_destroy().
|
inlinevirtual |
Implements RTT::os::MutexInterface.
Definition at line 235 of file Mutex.hpp.
References rtos_mutex_rec_lock().
Referenced by timedlock().
|
inlinevirtual |
Lock this mutex, but don't wait longer for the lock than the specified timeout.
s | The maximum time to wait before aqcuiring the lock. |
Implements RTT::os::MutexInterface.
Definition at line 264 of file Mutex.hpp.
References lock(), rtos_mutex_rec_trylock_for(), and RTT::Seconds_to_nsecs().
|
inlinevirtual |
Try to lock this mutex.
Implements RTT::os::MutexInterface.
Definition at line 250 of file Mutex.hpp.
References rtos_mutex_rec_trylock().
|
inlinevirtual |
Implements RTT::os::MutexInterface.
Definition at line 240 of file Mutex.hpp.
References rtos_mutex_rec_unlock().
|
protected |