9 #ifndef mrpt_synch_criticalsection_H 10 #define mrpt_synch_criticalsection_H 18 namespace utils {
class CStream; }
32 virtual void enter()
const =0;
33 virtual void leave()
const =0;
34 virtual bool try_enter()
const = 0;
55 std::
string getName()
const {
return m_name; }
124 #define THREADSAFE_OPERATION(_CRITSECT_OBJ, CODE_TO_EXECUTE ) \ 126 mrpt::synch::CCriticalSectionLocker lock(&_CRITSECT_OBJ); \ Recursive mutex: allow recursive locks by the owner thread.
This class provides simple critical sections functionality.
A class acquiring a CCriticalSection at its constructor, and releasing it at destructor.
CCriticalSectionLocker(const CCriticalSectionLocker &o)
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
utils::CStream * m_debugOut
If set to a non-NULL value, debug messages regarding the calling threads IDs will be output...
const CAbstractMutex * m_cs
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLsizei const GLchar ** string
void * m_data
std::mutex*. Opaque ptr until MRPT 2.0.0 in which we could expose C++11 to user headers ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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