Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef UT_MUTEXIMPL_H
00021 #define UT_MUTEXIMPL_H
00022
00023 #include <windows.h>
00024 #include "ut_types.h"
00025
00029 class ABI_EXPORT UT_MutexImpl
00030 {
00031 public:
00032
00033 UT_MutexImpl ()
00034 {
00035 ::InitializeCriticalSection(&m_cs);
00036 }
00037
00038 ~UT_MutexImpl ()
00039 {
00040 ::DeleteCriticalSection(&m_cs);
00041 }
00042
00043 void lock ()
00044 {
00045 ::EnterCriticalSection(&m_cs );
00046 }
00047
00048 void unlock ()
00049 {
00050 ::LeaveCriticalSection(&m_cs);
00051 }
00052
00053 private:
00054
00055
00056 UT_MutexImpl (const UT_MutexImpl & other);
00057 UT_MutexImpl & operator=(const UT_MutexImpl & other);
00058
00059 CRITICAL_SECTION m_cs;
00060 };
00061
00062 #endif