Public Member Functions | Private Attributes
Mutex Class Reference

#include <Mutex.h>

List of all members.

Public Member Functions

TMutexgetMutex ()
void lock ()
 Mutex ()
void unlock ()
virtual ~Mutex ()

Private Attributes

TMutexm_Mutex

Detailed Description

Protects a section of code to be executed by only a single thread at any given time.

The Mutex class provides a synchonization object that can be used to protect sections of code to be executed by only a single thread at any given time. This code fragment is also called a critical section, a mutex is also called a semaphore.

Mutex's have a lock() and unlock() method; only one thread can continue from the lock() until the unlock() method is called. During this time, any other thread has to wait until the mutex becomes available.

Note:
This implementation does not provide recursive mutexes.
Currently, this implementation supports only POSIX threads.

Definition at line 35 of file Mutex.h.


Constructor & Destructor Documentation

Constructor

Definition at line 17 of file Mutex.cpp.

Mutex::~Mutex ( ) [virtual]

Destructor

Definition at line 24 of file Mutex.cpp.


Member Function Documentation

Returns pointer of the mutex

Returns:
pointer of the mutex

Definition at line 43 of file Mutex.cpp.

void Mutex::lock ( )

Enter critical sections

Definition at line 31 of file Mutex.cpp.

void Mutex::unlock ( )

Leave critical sections

Definition at line 37 of file Mutex.cpp.


Member Data Documentation

TMutex* Mutex::m_Mutex [private]

Platform-dependent mutex representation.

Definition at line 71 of file Mutex.h.


The documentation for this class was generated from the following files:


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09