LLVM API Documentation

llvm::sys::RWMutexImpl Class Reference

Platform agnostic RWMutex class. More...

#include <RWMutex.h>

Inheritance diagram for llvm::sys::RWMutexImpl:
[legend]
Collaboration diagram for llvm::sys::RWMutexImpl:
[legend]

List of all members.

Public Member Functions

Constructors
 RWMutexImpl ()
 Default Constructor.
 ~RWMutexImpl ()
 Destructor.
Methods
bool reader_acquire ()
 Unconditionally acquire the lock in reader mode.
bool reader_release ()
 Unconditionally release the lock in reader mode.
bool writer_acquire ()
 Unconditionally acquire the lock in writer mode.
bool writer_release ()
 Unconditionally release the lock in write mode.


Detailed Description

Platform agnostic RWMutex class.

Definition at line 25 of file RWMutex.h.


Constructor & Destructor Documentation

llvm::RWMutexImpl::RWMutexImpl (  )  [explicit]

Default Constructor.

Initializes the lock but doesn't acquire it.

Definition at line 60 of file RWMutex.cpp.

References llvm::pthread_enabled.

llvm::RWMutexImpl::~RWMutexImpl (  ) 

Destructor.

Releases and removes the lock

Definition at line 99 of file RWMutex.cpp.

References llvm::pthread_enabled.


Member Function Documentation

bool llvm::RWMutexImpl::reader_acquire (  ) 

Unconditionally acquire the lock in reader mode.

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.

Reimplemented in llvm::sys::SmartRWMutex< mt_only >, and llvm::sys::SmartRWMutex< true >.

Definition at line 111 of file RWMutex.cpp.

References llvm::pthread_enabled.

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

bool llvm::RWMutexImpl::reader_release (  ) 

Unconditionally release the lock in reader mode.

Attempts to release the lock in reader mode.

Returns:
false if any kind of error occurs, true otherwise.

Reimplemented in llvm::sys::SmartRWMutex< mt_only >, and llvm::sys::SmartRWMutex< true >.

Definition at line 125 of file RWMutex.cpp.

References llvm::pthread_enabled.

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

bool llvm::RWMutexImpl::writer_acquire (  ) 

Unconditionally acquire the lock in writer mode.

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.

Reimplemented in llvm::sys::SmartRWMutex< mt_only >, and llvm::sys::SmartRWMutex< true >.

Definition at line 139 of file RWMutex.cpp.

References llvm::pthread_enabled.

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

bool llvm::RWMutexImpl::writer_release (  ) 

Unconditionally release the lock in write mode.

Attempts to release the lock in writer mode.

Returns:
false if any kind of error occurs, true otherwise.

Reimplemented in llvm::sys::SmartRWMutex< mt_only >, and llvm::sys::SmartRWMutex< true >.

Definition at line 153 of file RWMutex.cpp.

References llvm::pthread_enabled.

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


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