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);
49 std::mutex *mut =
reinterpret_cast<std::mutex*
>(
m_data);
60 std::mutex *mut =
reinterpret_cast<std::mutex*
>(
m_data);
66 std::mutex *mut =
reinterpret_cast<std::mutex*
>(
m_data);
67 return mut->try_lock();
72 m_data( new
std::recursive_mutex() )
77 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
84 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
90 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
96 std::recursive_mutex *mut =
reinterpret_cast<std::recursive_mutex*
>(
m_data);
97 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.
std::string getName() const
Returns the name used in the constructor.
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.
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 ...
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.