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. More...
#include <MutexLock.hpp>
Public Member Functions | |
bool | isSuccessful () |
bool | isSuccessful () |
MutexTryLock (MutexInterface &mutex) | |
MutexTryLock (MutexInterface &mutex) | |
~MutexTryLock () | |
~MutexTryLock () | |
Protected Member Functions | |
MutexTryLock () | |
MutexTryLock () | |
Protected Attributes | |
MutexInterface * | _mutex |
Private Attributes | |
bool | successful |
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 install/include/rtt/os/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 install/include/rtt/os/MutexLock.hpp.
RTT::os::MutexTryLock::~MutexTryLock | ( | ) | [inline] |
Releases, if any, a lock on the previously try-locked Mutex
Definition at line 115 of file install/include/rtt/os/MutexLock.hpp.
RTT::os::MutexTryLock::MutexTryLock | ( | ) | [inline, protected] |
Definition at line 127 of file install/include/rtt/os/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 rtt/os/MutexLock.hpp.
RTT::os::MutexTryLock::~MutexTryLock | ( | ) | [inline] |
Releases, if any, a lock on the previously try-locked Mutex
Definition at line 115 of file rtt/os/MutexLock.hpp.
RTT::os::MutexTryLock::MutexTryLock | ( | ) | [inline, protected] |
Definition at line 127 of file rtt/os/MutexLock.hpp.
bool RTT::os::MutexTryLock::isSuccessful | ( | ) | [inline] |
Return if the locking of the Mutex was succesfull
Definition at line 107 of file rtt/os/MutexLock.hpp.
bool RTT::os::MutexTryLock::isSuccessful | ( | ) | [inline] |
Return if the locking of the Mutex was succesfull
Definition at line 107 of file install/include/rtt/os/MutexLock.hpp.
MutexInterface * RTT::os::MutexTryLock::_mutex [protected] |
The Mutex to lock and unlock
Definition at line 125 of file install/include/rtt/os/MutexLock.hpp.
bool RTT::os::MutexTryLock::successful [private] |
Stores the state of success
Definition at line 135 of file install/include/rtt/os/MutexLock.hpp.