A mutex wrapper for compiler that dont yet support std::recursive_mutex.
More...
#include <easylogging++.h>
A mutex wrapper for compiler that dont yet support std::recursive_mutex.
Definition at line 914 of file easylogging++.h.
◆ Mutex()
| el::base::threading::internal::Mutex::Mutex |
( |
void |
| ) |
|
|
inline |
Definition at line 916 of file easylogging++.h.
918 pthread_mutexattr_t attr;
919 pthread_mutexattr_init(&attr);
920 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
921 pthread_mutex_init(&m_underlyingMutex, &attr);
922 pthread_mutexattr_destroy(&attr);
923 # elif ELPP_OS_WINDOWS
924 InitializeCriticalSection(&m_underlyingMutex);
◆ ~Mutex()
| virtual el::base::threading::internal::Mutex::~Mutex |
( |
void |
| ) |
|
|
inlinevirtual |
Definition at line 928 of file easylogging++.h.
930 pthread_mutex_destroy(&m_underlyingMutex);
931 # elif ELPP_OS_WINDOWS
932 DeleteCriticalSection(&m_underlyingMutex);
◆ lock()
| void el::base::threading::internal::Mutex::lock |
( |
void |
| ) |
|
|
inline |
Definition at line 936 of file easylogging++.h.
938 pthread_mutex_lock(&m_underlyingMutex);
939 # elif ELPP_OS_WINDOWS
940 EnterCriticalSection(&m_underlyingMutex);
◆ try_lock()
| bool el::base::threading::internal::Mutex::try_lock |
( |
void |
| ) |
|
|
inline |
Definition at line 944 of file easylogging++.h.
946 return (pthread_mutex_trylock(&m_underlyingMutex) == 0);
947 # elif ELPP_OS_WINDOWS
948 return TryEnterCriticalSection(&m_underlyingMutex);
◆ unlock()
| void el::base::threading::internal::Mutex::unlock |
( |
void |
| ) |
|
|
inline |
Definition at line 952 of file easylogging++.h.
954 pthread_mutex_unlock(&m_underlyingMutex);
955 # elif ELPP_OS_WINDOWS
956 LeaveCriticalSection(&m_underlyingMutex);
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-4.0.0.0/external/easylogging++/easylogging++.h