Tesseract  3.02
tesseract::CCUtilMutex Class Reference

#include <ccutil.h>

List of all members.

Public Member Functions

 CCUtilMutex ()
void Lock ()
void Unlock ()

Detailed Description

Definition at line 38 of file ccutil.h.


Constructor & Destructor Documentation

tesseract::CCUtilMutex::CCUtilMutex ( )

Definition at line 27 of file ccutil.cpp.

                         {
#ifdef _WIN32
  mutex_ = CreateMutex(0, FALSE, 0);
#else
  pthread_mutex_init(&mutex_, NULL);
#endif
}

Member Function Documentation

void tesseract::CCUtilMutex::Lock ( )

Definition at line 35 of file ccutil.cpp.

                       {
#ifdef _WIN32
  WaitForSingleObject(mutex_, INFINITE);
#else
  pthread_mutex_lock(&mutex_);
#endif
}
void tesseract::CCUtilMutex::Unlock ( )

Definition at line 43 of file ccutil.cpp.

                         {
#ifdef _WIN32
  ReleaseMutex(mutex_);
#else
  pthread_mutex_unlock(&mutex_);
#endif
}

The documentation for this class was generated from the following files: