Orocos Real-Time Toolkit
2.5.0
|
A MutexTryLock tries to lock an Mutex object on construction and if successful, unlocks it on destruction of the MutexTryLock. More...
#include <rtt/os/MutexLock.hpp>
Public Member Functions | |
MutexTryLock (MutexInterface &mutex) | |
Try to lock a Mutex object. | |
bool | isSuccessful () |
Return if the locking of the Mutex was succesfull. | |
~MutexTryLock () | |
Releases, if any, a lock on the previously try-locked Mutex. | |
Protected Attributes | |
MutexInterface * | _mutex |
The Mutex to lock and unlock. |
A MutexTryLock tries to lock an Mutex object on construction and if successful, unlocks it on destruction of the MutexTryLock.
Use isSuccessful() to check whether the attempt succeeded.
Definition at line 87 of file MutexLock.hpp.
RTT::os::MutexTryLock::MutexTryLock | ( | MutexInterface & | mutex | ) | [inline] |
Try to lock a Mutex object.
mutex | The Mutex which should be attempted to be locked |
Definition at line 97 of file MutexLock.hpp.
bool RTT::os::MutexTryLock::isSuccessful | ( | ) | [inline] |
Return if the locking of the Mutex was succesfull.
Definition at line 107 of file MutexLock.hpp.
Referenced by RTT::extras::SequentialActivity::trigger().