LLVM API Documentation

llvm::sys::SmartRWMutex< mt_only > Class Template Reference

#include <RWMutex.h>

Inheritance diagram for llvm::sys::SmartRWMutex< mt_only >:
[legend]
Collaboration diagram for llvm::sys::SmartRWMutex< mt_only >:
[legend]

List of all members.

Public Member Functions

 SmartRWMutex ()
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

template<bool mt_only>
class llvm::sys::SmartRWMutex< mt_only >

SmartMutex - An R/W mutex with a compile time constant parameter that indicates whether this mutex should become a no-op when we're not running in multithreaded mode.

Definition at line 87 of file RWMutex.h.


Constructor & Destructor Documentation

template<bool mt_only>
llvm::sys::SmartRWMutex< mt_only >::SmartRWMutex (  )  [inline, explicit]

Definition at line 90 of file RWMutex.h.


Member Function Documentation

template<bool mt_only>
bool llvm::sys::SmartRWMutex< mt_only >::reader_acquire (  )  [inline]

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 from llvm::sys::RWMutexImpl.

Definition at line 92 of file RWMutex.h.

Referenced by llvm::ConstantFP::get(), and llvm::ConstantInt::get().

template<bool mt_only>
bool llvm::sys::SmartRWMutex< mt_only >::reader_release (  )  [inline]

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 from llvm::sys::RWMutexImpl.

Definition at line 102 of file RWMutex.h.

Referenced by llvm::ConstantFP::get(), and llvm::ConstantInt::get().

template<bool mt_only>
bool llvm::sys::SmartRWMutex< mt_only >::writer_acquire (  )  [inline]

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 from llvm::sys::RWMutexImpl.

Definition at line 113 of file RWMutex.h.

template<bool mt_only>
bool llvm::sys::SmartRWMutex< mt_only >::writer_release (  )  [inline]

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 from llvm::sys::RWMutexImpl.

Definition at line 124 of file RWMutex.h.


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