MRPT logo

mrpt::synch::CCriticalSection Class Reference

This class provides simple critical sections functionality. More...

#include <mrpt/synch/CCriticalSection.h>

List of all members.

Public Member Functions

 CCriticalSection (const char *name=NULL)
 Constructor.
 ~CCriticalSection ()
 Destructor.
void enter () const
 Enter.
void leave () const
 Leave
Exceptions:
If the calling thread is not the current owener of the critical section.

std::string getName () const
 Returns the name used in the constructor.

Public Attributes

utils::CStreamm_debugOut
 If set to a non-NULL value, debug messages regarding the calling threads IDs will be output.

Private Attributes

utils::CReferencedMemBlock m_data
 The OS-dependent descriptors.
std::string m_name


Detailed Description

This class provides simple critical sections functionality.

See also:
CCriticalSectionLocker

Definition at line 47 of file CCriticalSection.h.


Constructor & Destructor Documentation

mrpt::synch::CCriticalSection::CCriticalSection ( const char *  name = NULL  ) 

Constructor.

mrpt::synch::CCriticalSection::~CCriticalSection (  ) 

Destructor.


Member Function Documentation

void mrpt::synch::CCriticalSection::enter (  )  const

Enter.

Exceptions:
If the calling thread already possesses this critical section (it would be a dead-lock).

Referenced by mrpt::utils::CConsoleRedirector::overflow(), and mrpt::utils::CConsoleRedirector::sync().

std::string mrpt::synch::CCriticalSection::getName (  )  const [inline]

Returns the name used in the constructor.

Definition at line 73 of file CCriticalSection.h.

void mrpt::synch::CCriticalSection::leave (  )  const

Leave

Exceptions:
If the calling thread is not the current owener of the critical section.

Referenced by mrpt::utils::CConsoleRedirector::overflow(), and mrpt::utils::CConsoleRedirector::sync().


Member Data Documentation

The OS-dependent descriptors.

Definition at line 50 of file CCriticalSection.h.

If set to a non-NULL value, debug messages regarding the calling threads IDs will be output.

Definition at line 77 of file CCriticalSection.h.

Definition at line 52 of file CCriticalSection.h.




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Sun Aug 9 21:47:23 CEST 2009