mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Give RWMutex the SmartRWMutex treatment too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73710 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+12
-12
@@ -23,12 +23,12 @@
|
||||
// Define all methods as no-ops if threading is explicitly disabled
|
||||
namespace llvm {
|
||||
using namespace sys;
|
||||
RWMutex::RWMutex() { }
|
||||
RWMutex::~RWMutex() { }
|
||||
bool RWMutex::reader_acquire() { return true; }
|
||||
bool RWMutex::reader_release() { return true; }
|
||||
bool RWMutex::writer_acquire() { return true; }
|
||||
bool RWMutex::writer_release() { return true; }
|
||||
RWMutexImpl::RWMutexImpl() { }
|
||||
RWMutexImpl::~RWMutexImpl() { }
|
||||
bool RWMutexImpl::reader_acquire() { return true; }
|
||||
bool RWMutexImpl::reader_release() { return true; }
|
||||
bool RWMutexImpl::writer_acquire() { return true; }
|
||||
bool RWMutexImpl::writer_release() { return true; }
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -56,7 +56,7 @@ using namespace sys;
|
||||
static const bool pthread_enabled = true;
|
||||
|
||||
// Construct a RWMutex using pthread calls
|
||||
RWMutex::RWMutex()
|
||||
RWMutexImpl::RWMutexImpl()
|
||||
: data_(0)
|
||||
{
|
||||
if (pthread_enabled)
|
||||
@@ -89,7 +89,7 @@ RWMutex::RWMutex()
|
||||
}
|
||||
|
||||
// Destruct a RWMutex
|
||||
RWMutex::~RWMutex()
|
||||
RWMutexImpl::~RWMutexImpl()
|
||||
{
|
||||
if (pthread_enabled)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ RWMutex::~RWMutex()
|
||||
}
|
||||
|
||||
bool
|
||||
RWMutex::reader_acquire()
|
||||
RWMutexImpl::reader_acquire()
|
||||
{
|
||||
if (pthread_enabled)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ RWMutex::reader_acquire()
|
||||
}
|
||||
|
||||
bool
|
||||
RWMutex::reader_release()
|
||||
RWMutexImpl::reader_release()
|
||||
{
|
||||
if (pthread_enabled)
|
||||
{
|
||||
@@ -129,7 +129,7 @@ RWMutex::reader_release()
|
||||
}
|
||||
|
||||
bool
|
||||
RWMutex::writer_acquire()
|
||||
RWMutexImpl::writer_acquire()
|
||||
{
|
||||
if (pthread_enabled)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ RWMutex::writer_acquire()
|
||||
}
|
||||
|
||||
bool
|
||||
RWMutex::writer_release()
|
||||
RWMutexImpl::writer_release()
|
||||
{
|
||||
if (pthread_enabled)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user