RTT::OS::MutexRecursive Class Reference

An object oriented wrapper around a recursive mutex. More...

#include <rtt/os/Mutex.hpp>

Inheritance diagram for RTT::OS::MutexRecursive:
RTT::OS::MutexInterface

List of all members.

Public Member Functions

 MutexRecursive ()
 Initialize a recursive Mutex.
virtual ~MutexRecursive ()
 Destroy a MutexRecursive.
void lock ()
virtual void unlock ()
virtual bool trylock ()
 Try to lock this mutex.
virtual bool timedlock (Seconds s)
 Lock this mutex, but don't wait longer for the lock than the specified timeout.

Protected Attributes

rt_rec_mutex_t recm

Detailed Description

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.

See also:
MutexLock, MutexTryLock, Mutex

Definition at line 201 of file Mutex.hpp.


Constructor & Destructor Documentation

virtual RTT::OS::MutexRecursive::~MutexRecursive (  )  [inline, virtual]

Destroy a MutexRecursive.

If the MutexRecursive is still locked, the RTOS will not be asked to clean up its resources.

Definition at line 220 of file Mutex.hpp.


Member Function Documentation

virtual bool RTT::OS::MutexRecursive::timedlock ( Seconds  s  )  [inline, virtual]

Lock this mutex, but don't wait longer for the lock than the specified timeout.

Parameters:
s The maximum time to wait before aqcuiring the lock.
Returns:
true when the locking succeeded, false otherwise

Implements RTT::OS::MutexInterface.

Definition at line 257 of file Mutex.hpp.

virtual bool RTT::OS::MutexRecursive::trylock (  )  [inline, virtual]

Try to lock this mutex.

Returns:
true when the locking succeeded, false otherwise

Implements RTT::OS::MutexInterface.

Definition at line 243 of file Mutex.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:47 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3