#include <LibState.h>
Definition at line 12 of file LibState.h.
◆ InternalMutex()
| __DCL_BEGIN_NAMESPACE InternalMutex::InternalMutex |
( |
const char * | _name | ) |
|
Definition at line 36 of file LibState.cpp.
37{
38#if __DCL_PTHREAD
39 pthread_mutex_init(&__mutex,
NULL);
40#elif defined(__WINNT__)
41 InitializeCriticalSection(&__cs);
42#endif
43 __name = _name;
44}
◆ ~InternalMutex()
| InternalMutex::~InternalMutex |
( |
| ) |
|
Definition at line 46 of file LibState.cpp.
47{
48#if __DCL_PTHREAD
49 pthread_mutex_destroy(&__mutex);
50#elif defined(__WINNT__)
51 DeleteCriticalSection(&__cs);
52#endif
53}
◆ lock()
| void InternalMutex::lock |
( |
| ) |
|
Definition at line 55 of file LibState.cpp.
56{
57#if __DCL_PTHREAD
58 pthread_mutex_lock(&__mutex);
59#elif defined(__WINNT__)
60 EnterCriticalSection(&__cs);
61#endif
62}
◆ unlock()
| void InternalMutex::unlock |
( |
| ) |
|
Definition at line 64 of file LibState.cpp.
65{
66#if __DCL_PTHREAD
67 pthread_mutex_unlock(&__mutex);
68#elif defined(__WINNT__)
69 LeaveCriticalSection(&__cs);
70#endif
71}
The documentation for this class was generated from the following files: