18#if defined(_MSC_VER) || defined(__APPLE__) || defined(DOXYGEN_RUN)
22 uint64_t threadId = 0;
23 memcpy(&threadId, &ptid, std::min(
sizeof(threadId),
sizeof(ptid)));
31 TRACE2(
this,
" Construct CPthread_scoped_lock (lock pthread mutex)")
32 if (::pthread_mutex_lock(&m_mutex) != 0)
33 throw std::runtime_error(UPnPsdk_LOGEXCEPT(
34 "MSG1152")
"The mutex has not been properly initialized.\n");
38 TRACE2(
this,
" Destruct CPthread_scoped_lock (unlock pthread mutex)")
39 if (::pthread_mutex_unlock(&m_mutex) != 0)
41 "MSG1153")
"The mutex has not been properly initialized.\n";
~CPthread_scoped_lock()
Unlock the mutex that was locked by the constructor.
CPthread_scoped_lock(::pthread_mutex_t &a_mutex)
Locks given POSIX thread mutex.
Reengineered Object Oriented UPnP+ program code.
UPnPsdk_VIS uint64_t pthread_self()
Get pthread thread id as unsigned integer.
Additional functions to manage Posix threads with C++ to be portable.
Define macro for synced logging to the console for detailed info and debug.