9 #ifndef mrpt_synch_criticalsection_H
10 #define mrpt_synch_criticalsection_H
17 namespace utils {
class CStream; }
57 std::string
getName()
const {
return m_name; }
118 #define THREADSAFE_OPERATION(_CRITSECT_OBJ, CODE_TO_EXECUTE ) \
120 mrpt::synch::CCriticalSectionLocker lock(&_CRITSECT_OBJ); \
This class provides simple critical sections functionality.
mrpt::utils::CReferencedMemBlock m_data
The OS-dependent descriptors.
std::string getName() const
Returns the name used in the constructor.
~CCriticalSection()
Destructor.
CCriticalSection(const char *name=NULL)
Constructor.
utils::CStream * m_debugOut
If set to a non-NULL value, debug messages regarding the calling threads IDs will be output.
A class acquiring a CCriticalSection at its constructor, and releasing it at destructor.
~CCriticalSectionLocker()
Destructor: leaves the critical section.
CCriticalSectionLocker(const CCriticalSectionLocker &o)
const CCriticalSection * m_cs
CCriticalSectionLocker(const CCriticalSection *cs)
Constructor: enters the critical section.
Represents a memory block (via "void*") that can be shared between several objects through copy opera...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.