9 #ifndef mrpt_synch_criticalsection_H
10 #define mrpt_synch_criticalsection_H
17 namespace utils {
class CStream; }
54 std::
string getName() const;
57 utils::CStream *m_debugOut;
123 #define THREADSAFE_OPERATION(_CRITSECT_OBJ, CODE_TO_EXECUTE ) \
125 mrpt::synch::CCriticalSectionLocker lock(&_CRITSECT_OBJ); \
virtual bool try_enter() const =0
Returns true if adquired; false otherwise.
virtual void leave() const =0
virtual void enter() const =0
This class provides simple critical sections functionality.
void * m_data
std::mutex*. Opaque ptr until MRPT 2.0.0 in which we could expose C++11 to user headers
A class acquiring a CCriticalSection at its constructor, and releasing it at destructor.
const CAbstractMutex * m_cs
CCriticalSectionLocker(const CCriticalSectionLocker &o)
Recursive mutex: allow recursive locks by the owner thread.
void * m_data
std::recursive_mutex*. Opaque ptr until MRPT 2.0.0 in which we could expose C++11 to user headers
GLuint const GLchar * name
GLsizei const GLchar ** string
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.