Tesseract
3.02
|
#include <svutil.h>
Public Member Functions | |
SVMutex () | |
Sets up a new mutex. | |
void | Lock () |
Locks on a mutex. | |
void | Unlock () |
Unlocks on a mutex. |
A mutex which encapsulates the main locking and unlocking abilites of mutexes for windows and unix.
SVMutex::SVMutex | ( | ) |
Sets up a new mutex.
Definition at line 149 of file svutil.cpp.
void SVMutex::Lock | ( | ) |
Locks on a mutex.
Definition at line 157 of file svutil.cpp.
{ #ifdef _WIN32 WaitForSingleObject(mutex_, INFINITE); #else pthread_mutex_lock(&mutex_); #endif }
void SVMutex::Unlock | ( | ) |
Unlocks on a mutex.
Definition at line 165 of file svutil.cpp.
{ #ifdef _WIN32 ReleaseMutex(mutex_); #else pthread_mutex_unlock(&mutex_); #endif }