#include <ccutil.h>
Definition at line 40 of file ccutil.h.
◆ CCUtilMutex()
tesseract::CCUtilMutex::CCUtilMutex |
( |
| ) |
|
Definition at line 29 of file ccutil.cpp.
29 {
30#ifdef _WIN32
31 mutex_ = CreateMutex(0,
FALSE, 0);
32#else
33 pthread_mutex_init(&mutex_, nullptr);
34#endif
35}
◆ Lock()
void tesseract::CCUtilMutex::Lock |
( |
| ) |
|
Definition at line 37 of file ccutil.cpp.
37 {
38#ifdef _WIN32
39 WaitForSingleObject(mutex_, INFINITE);
40#else
41 pthread_mutex_lock(&mutex_);
42#endif
43}
◆ Unlock()
void tesseract::CCUtilMutex::Unlock |
( |
| ) |
|
Definition at line 45 of file ccutil.cpp.
45 {
46#ifdef _WIN32
47 ReleaseMutex(mutex_);
48#else
49 pthread_mutex_unlock(&mutex_);
50#endif
51}
The documentation for this class was generated from the following files: