summaryrefslogtreecommitdiff
path: root/lib/System
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-16 20:49:20 +0000
committerOwen Anderson <resistor@mac.com>2009-06-16 20:49:20 +0000
commitd76a0775f153765f31b96452234afb2c5c724deb (patch)
treea3648d36cb5890f24da9593f692963063bd4c41a /lib/System
parent82995a83e1a6b6a3822c9171e9b00301e3b809c7 (diff)
downloadllvm-d76a0775f153765f31b96452234afb2c5c724deb.tar.gz
llvm-d76a0775f153765f31b96452234afb2c5c724deb.tar.bz2
llvm-d76a0775f153765f31b96452234afb2c5c724deb.tar.xz
Remove the Win32 implementation, since it doesn't compile pre-Vista.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Win32/RWMutex.inc19
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/System/Win32/RWMutex.inc b/lib/System/Win32/RWMutex.inc
index 08c31f1eb7..5360b41b0e 100644
--- a/lib/System/Win32/RWMutex.inc
+++ b/lib/System/Win32/RWMutex.inc
@@ -18,36 +18,31 @@
#include "Win32.h"
+// FIXME: THIS IS NOT THREAD-SAFE!!
+// Windows does not have reader-writer locks pre-Vista. If you want to have
+// thread-safe LLVM on Windows, for now at least, you need to use a pthreads
+// replacement library.
+
namespace llvm {
using namespace sys;
-RWMutex::RWMutex() {
- data_ = new PSRWLOCK;
- InitializeSRWLock((PSRWLOCK*)data_);
-}
+RWMutex::RWMutex() { }
-RWMutex::~RWMutex() {
- delete (PSRWLOCK*)data_;
- data_ = 0;
-}
+RWMutex::~RWMutex() { }
bool RWMutex::reader_acquire() {
- AcquireSRWLockShared((PSRWLOCK*)data_);
return true;
}
bool RWMutex::reader_release() {
- ReleaseSRWLockShared((PSRWLOCK*)data_);
return true;
}
bool RWMutex::writer_acquire() {
- AcquireSRWLockExclusive((PSRWLOCK*)data_);
return true;
}
bool RWMutex::writer_release() {
- ReleaseSRWLockExclusive((PSRWLOCK*)data_);
return true;
}