#include <LibState.h>
Definition at line 16 of file LibState.h.
◆ InternalMutex()
| __DCL_BEGIN_NAMESPACE InternalMutex::InternalMutex |
( |
const char * | pszName | ) |
|
Definition at line 34 of file LibState.cpp.
35{
36#if __DCL_PTHREAD
37 pthread_mutex_init(&m_mutex,
NULL);
38#elif __DCL_WINDOWS
39 InitializeCriticalSection(&m_cs);
40#endif
41 m_pszName = pszName;
42}
◆ ~InternalMutex()
| InternalMutex::~InternalMutex |
( |
| ) |
|
Definition at line 44 of file LibState.cpp.
45{
46#if __DCL_PTHREAD
47 pthread_mutex_destroy(&m_mutex);
48#elif __DCL_WINDOWS
49 DeleteCriticalSection(&m_cs);
50#endif
51}
◆ lock()
| void InternalMutex::lock |
( |
| ) |
|
Definition at line 53 of file LibState.cpp.
54{
55#if __DCL_PTHREAD
56 pthread_mutex_lock(&m_mutex);
57#elif __DCL_WINDOWS
58 EnterCriticalSection(&m_cs);
59#endif
60}
◆ unlock()
| void InternalMutex::unlock |
( |
| ) |
|
Definition at line 62 of file LibState.cpp.
63{
64#if __DCL_PTHREAD
65 pthread_mutex_unlock(&m_mutex);
66#elif __DCL_WINDOWS
67 LeaveCriticalSection(&m_cs);
68#endif
69}
The documentation for this class was generated from the following files: