20 CAbstractMutex::~CAbstractMutex()
25 CCriticalSection::CCriticalSection(
const char *
name) :
26 m_data(new
std::mutex()),
34 std::mutex *mut =
reinterpret_cast<std::mutex*
>(
m_data);
44 std::mutex *mut =
reinterpret_cast<std::mutex*
>(
m_data);
55 std::mutex *mut =
reinterpret_cast<std::mutex*
>(
m_data);
61 std::mutex *mut =
reinterpret_cast<std::mutex*
>(
m_data);
62 return mut->try_lock();
67 m_data( new
std::recursive_mutex() )
72 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
79 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
85 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
91 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
92 return mut->try_lock();
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void enter() const MRPT_OVERRIDE
Enter.
unsigned long BASE_IMPEXP getCurrentThreadId() MRPT_NO_THROWS
Returns the ID of the current thread.
utils::CStream * m_debugOut
If set to a non-NULL value, debug messages regarding the calling threads IDs will be output...
bool try_enter() const MRPT_OVERRIDE
Returns true if adquired; false otherwise.
void leave() const MRPT_OVERRIDE
Leave.
void enter() const MRPT_OVERRIDE
Enter.
bool try_enter() const MRPT_OVERRIDE
Returns true if adquired; false otherwise.
This namespace provides multitask, synchronization utilities.
void * m_data
std::mutex*. Opaque ptr until MRPT 2.0.0 in which we could expose C++11 to user headers ...
virtual ~CCriticalSection()
Dtor.
void * m_data
std::recursive_mutex*. Opaque ptr until MRPT 2.0.0 in which we could expose C++11 to user headers ...
virtual ~CCriticalSectionRecursive()
GLuint const GLchar * name
CCriticalSectionRecursive()
void leave() const MRPT_OVERRIDE
Leave.
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.