Mutex Class Reference

#include </home/sspr/src/www/orocos-1.0/export/build/orocos-rtt-1.2.2/build/rtt/os/Mutex.hpp>

Inheritance diagram for Mutex:

MutexInterface List of all members.

Detailed Description

An object oriented wrapper around a non 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.

Warning:
Mutex instances should only be created in soft realtime, since the initialisation of a mutex can not be done in hard realtime.
See also:
MutexLock, MutexTryLock, MutexRecursive


Public Member Functions

 Mutex ()
 Initialize a Mutex.
virtual ~Mutex ()
 Destroy a Mutex.
virtual void lock ()
virtual void unlock ()
virtual bool trylock ()
 Try to lock this mutex.

Protected Attributes

rt_mutex_t m

Friends

class OS::MutexLock
class OS::MutexTryLock


Constructor & Destructor Documentation

virtual ~Mutex (  )  [inline, virtual]

Destroy a Mutex.

This is a blocking operation on the mutex itself. The mutex may not be locked when you call the destructor.


Member Function Documentation

virtual bool trylock (  )  [inline, virtual]

Try to lock this mutex.

Returns:
true when the locking succeeded, false otherwise

Implements MutexInterface.


The documentation for this class was generated from the following file:
Generated on Fri Oct 19 16:27:29 2007 for Orocos by  doxygen 1.5.1