aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Win32
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-18 17:53:17 +0000
committerOwen Anderson <resistor@mac.com>2009-06-18 17:53:17 +0000
commitb849a4dd4bee9ad17e295691087ce09e8d77d685 (patch)
treed8db21f0b4ae2c14aefdc587b06368c5278620bd /lib/System/Win32
parente53118ea32370b5c57c61ae5e8125883acfb641b (diff)
Insert a SmartMutex templated class into the class hierarchy, which takes a template parameter specifying whether this mutex
should become a no-op when not running in multithreaded mode. Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32')
-rw-r--r--lib/System/Win32/Mutex.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/System/Win32/Mutex.inc b/lib/System/Win32/Mutex.inc
index 7c1723be73..75f01fefac 100644
--- a/lib/System/Win32/Mutex.inc
+++ b/lib/System/Win32/Mutex.inc
@@ -22,13 +22,13 @@
namespace llvm {
using namespace sys;
-Mutex::Mutex(bool /*recursive*/)
+MutexImpl::MutexImpl(bool /*recursive*/)
{
data_ = new CRITICAL_SECTION;
InitializeCriticalSection((LPCRITICAL_SECTION)data_);
}
-Mutex::~Mutex()
+MutexImpl::~MutexImpl()
{
DeleteCriticalSection((LPCRITICAL_SECTION)data_);
delete (LPCRITICAL_SECTION)data_;
@@ -36,21 +36,21 @@ Mutex::~Mutex()
}
bool
-Mutex::acquire()
+MutexImpl::acquire()
{
EnterCriticalSection((LPCRITICAL_SECTION)data_);
return true;
}
bool
-Mutex::release()
+MutexImpl::release()
{
LeaveCriticalSection((LPCRITICAL_SECTION)data_);
return true;
}
bool
-Mutex::tryacquire()
+MutexImpl::tryacquire()
{
return TryEnterCriticalSection((LPCRITICAL_SECTION)data_);
}