LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
llvm::sys::RWMutexImpl Class Reference

Platform agnostic RWMutex class. More...

#include <RWMutex.h>

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

Public Member Functions

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

Detailed Description

Platform agnostic RWMutex class.

Definition at line 26 of file RWMutex.h.

Constructor & Destructor Documentation

llvm::RWMutexImpl::RWMutexImpl ( )
explicit

Default Constructor.

Initializes the lock but doesn't acquire it.

Definition at line 46 of file RWMutex.cpp.

References llvm::LibFunc::bzero, and llvm::LibFunc::malloc.

llvm::RWMutexImpl::~RWMutexImpl ( )

Destructor.

Releases and removes the lock

Definition at line 68 of file RWMutex.cpp.

References llvm::LibFunc::free.

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.

Definition at line 77 of file RWMutex.cpp.

Referenced by llvm::sys::SmartRWMutex< mt_only >::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.

Definition at line 87 of file RWMutex.cpp.

Referenced by llvm::sys::SmartRWMutex< mt_only >::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.

Definition at line 97 of file RWMutex.cpp.

Referenced by llvm::sys::SmartRWMutex< mt_only >::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.

Definition at line 107 of file RWMutex.cpp.

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


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