00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "CMutex.h"
00016 #include "CArch.h"
00017
00018
00019
00020
00021
00022 CMutex::CMutex()
00023 {
00024 m_mutex = ARCH->newMutex();
00025 }
00026
00027 CMutex::CMutex(const CMutex&)
00028 {
00029 m_mutex = ARCH->newMutex();
00030 }
00031
00032 CMutex::~CMutex()
00033 {
00034 ARCH->closeMutex(m_mutex);
00035 }
00036
00037 CMutex&
00038 CMutex::operator=(const CMutex&)
00039 {
00040 return *this;
00041 }
00042
00043 void
00044 CMutex::lock() const
00045 {
00046 ARCH->lockMutex(m_mutex);
00047 }
00048
00049 void
00050 CMutex::unlock() const
00051 {
00052 ARCH->unlockMutex(m_mutex);
00053 }