LLVM  4.0.0
List of all members
llvm::sys::RWMutexImpl Class Reference

Platform agnostic RWMutex class. More...

#include <RWMutex.h>

Public Member Functions

Constructors
 RWMutexImpl ()
 Initializes the lock but doesn't acquire it. More...
 
 ~RWMutexImpl ()
 Releases and removes the lock. More...
 
Methods
bool reader_acquire ()
 Attempts to unconditionally acquire the lock in reader mode. More...
 
bool reader_release ()
 Attempts to release the lock in reader mode. More...
 
bool writer_acquire ()
 Attempts to unconditionally acquire the lock in reader mode. More...
 
bool writer_release ()
 Attempts to release the lock in writer mode. More...
 

Detailed Description

Platform agnostic RWMutex class.

Definition at line 25 of file RWMutex.h.

Constructor & Destructor Documentation

llvm::RWMutexImpl::RWMutexImpl ( )
explicit

Initializes the lock but doesn't acquire it.

Default Constructor.

Definition at line 46 of file RWMutex.cpp.

References assert().

llvm::RWMutexImpl::~RWMutexImpl ( )

Releases and removes the lock.

Destructor

Definition at line 68 of file RWMutex.cpp.

References assert().

Member Function Documentation

bool llvm::RWMutexImpl::reader_acquire ( )

Attempts to unconditionally acquire the lock in reader mode.

If the lock is held by a writer, this method will wait until it can acquire the lock.

Returns
false if any kind of error occurs, true otherwise. Unconditionally acquire the lock in reader mode.

Definition at line 77 of file RWMutex.cpp.

References assert().

Referenced by llvm::sys::SmartRWMutex< true >::lock_shared().

bool llvm::RWMutexImpl::reader_release ( )

Attempts to release the lock in reader mode.

Returns
false if any kind of error occurs, true otherwise. Unconditionally release the lock in reader mode.

Definition at line 87 of file RWMutex.cpp.

References assert().

Referenced by llvm::sys::SmartRWMutex< true >::unlock_shared().

bool llvm::RWMutexImpl::writer_acquire ( )

Attempts to unconditionally acquire the lock in reader mode.

If the lock is held by any readers, this method will wait until it can acquire the lock.

Returns
false if any kind of error occurs, true otherwise. Unconditionally acquire the lock in writer mode.

Definition at line 97 of file RWMutex.cpp.

References assert().

Referenced by llvm::sys::SmartRWMutex< true >::lock().

bool llvm::RWMutexImpl::writer_release ( )

Attempts to release the lock in writer mode.

Returns
false if any kind of error occurs, true otherwise. Unconditionally release the lock in write mode.

Definition at line 107 of file RWMutex.cpp.

References assert().

Referenced by llvm::sys::SmartRWMutex< true >::unlock().


The documentation for this class was generated from the following files: