[llvm] r220969 - Update the non-pthreads fallback for RWMutex on Unix
David Blaikie
dblaikie at gmail.com
Fri Oct 31 10:02:30 PDT 2014
Author: dblaikie
Date: Fri Oct 31 12:02:30 2014
New Revision: 220969
URL: http://llvm.org/viewvc/llvm-project?rev=220969&view=rev
Log:
Update the non-pthreads fallback for RWMutex on Unix
Tested this by #if 0'ing out the pthreads implementation, which
indicated that this fallback was not currently compiling successfully
and applying this patch resolves that.
Patch by Andy Chien.
Modified:
llvm/trunk/lib/Support/Unix/RWMutex.inc
Modified: llvm/trunk/lib/Support/Unix/RWMutex.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/RWMutex.inc?rev=220969&r1=220968&r2=220969&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/RWMutex.inc (original)
+++ llvm/trunk/lib/Support/Unix/RWMutex.inc Fri Oct 31 12:02:30 2014
@@ -26,26 +26,26 @@ using namespace sys;
// will therefore deadlock if a thread tries to acquire a read lock
// multiple times.
-RWMutexImpl::RWMutexImpl() : data_(new Mutex(false)) { }
+RWMutexImpl::RWMutexImpl() : data_(new MutexImpl(false)) { }
RWMutexImpl::~RWMutexImpl() {
- delete static_cast<Mutex *>(data_);
+ delete static_cast<MutexImpl *>(data_);
}
bool RWMutexImpl::reader_acquire() {
- return static_cast<Mutex *>(data_)->acquire();
+ return static_cast<MutexImpl *>(data_)->acquire();
}
bool RWMutexImpl::reader_release() {
- return static_cast<Mutex *>(data_)->release();
+ return static_cast<MutexImpl *>(data_)->release();
}
bool RWMutexImpl::writer_acquire() {
- return static_cast<Mutex *>(data_)->acquire();
+ return static_cast<MutexImpl *>(data_)->acquire();
}
bool RWMutexImpl::writer_release() {
- return static_cast<Mutex *>(data_)->release();
+ return static_cast<MutexImpl *>(data_)->release();
}
}
More information about the llvm-commits
mailing list