Remove the Win32 implementation, since it doesn't compile pre-Vista.
[oota-llvm.git] / lib / System / Win32 / RWMutex.inc
index 08c31f1eb7d2249b0e1ef4b16c1dbf039f935643..5360b41b0e65b94217b1f50c1b1b3622b46d5e39 100644 (file)
 
 #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;
 }