This class provides simple critical sections functionality.
Definition at line 47 of file CCriticalSection.h.
#include <mrpt/synch/CCriticalSection.h>
Public Member Functions | ||||
CCriticalSection (const char *name=NULL) | ||||
Constructor. | ||||
~CCriticalSection () | ||||
Destructor. | ||||
void | enter () const | |||
Enter. | ||||
void | leave () const | |||
Leave
| ||||
std::string | getName () const | |||
Returns the name used in the constructor. | ||||
Public Attributes | ||||
utils::CStream * | m_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 |
mrpt::synch::CCriticalSection::CCriticalSection | ( | const char * | name = NULL |
) |
Constructor.
mrpt::synch::CCriticalSection::~CCriticalSection | ( | ) |
Destructor.
void mrpt::synch::CCriticalSection::enter | ( | ) | const |
Enter.
If | the calling thread already possesses this critical section (it would be a dead-lock). |
Referenced by mrpt::synch::MT_buffer::appendData(), mrpt::synch::MT_buffer::clear(), mrpt::utils::CConsoleRedirector::overflow(), mrpt::synch::MT_buffer::read(), mrpt::synch::MT_buffer::readAndClear(), mrpt::synch::MT_buffer::size(), 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
If | the calling thread is not the current owener of the critical section. |
Referenced by mrpt::synch::MT_buffer::appendData(), mrpt::synch::MT_buffer::clear(), mrpt::utils::CConsoleRedirector::overflow(), mrpt::synch::MT_buffer::read(), mrpt::synch::MT_buffer::readAndClear(), mrpt::synch::MT_buffer::size(), and mrpt::utils::CConsoleRedirector::sync().
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.
std::string mrpt::synch::CCriticalSection::m_name [private] |
Definition at line 52 of file CCriticalSection.h.
Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011 |