From 626507fab33b50ef542c75078de1182791ceca9a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 31 Oct 2014 17:02:30 +0000 Subject: [PATCH] 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. llvm-svn: 220969 --- llvm/lib/Support/Unix/RWMutex.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Support/Unix/RWMutex.inc b/llvm/lib/Support/Unix/RWMutex.inc index edcbd52..85a1043 100644 --- a/llvm/lib/Support/Unix/RWMutex.inc +++ b/llvm/lib/Support/Unix/RWMutex.inc @@ -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(data_); + delete static_cast(data_); } bool RWMutexImpl::reader_acquire() { - return static_cast(data_)->acquire(); + return static_cast(data_)->acquire(); } bool RWMutexImpl::reader_release() { - return static_cast(data_)->release(); + return static_cast(data_)->release(); } bool RWMutexImpl::writer_acquire() { - return static_cast(data_)->acquire(); + return static_cast(data_)->acquire(); } bool RWMutexImpl::writer_release() { - return static_cast(data_)->release(); + return static_cast(data_)->release(); } } -- 2.7.4