LLVM API Documentation

Public Member Functions
llvm::sys::SmartRWMutex< mt_only > Class Template Reference

#include <RWMutex.h>

Inheritance diagram for llvm::sys::SmartRWMutex< mt_only >:
Inheritance graph
[legend]
Collaboration diagram for llvm::sys::SmartRWMutex< mt_only >:
Collaboration graph
[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 88 of file RWMutex.h.


Constructor & Destructor Documentation

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

Definition at line 91 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 93 of file RWMutex.h.

References llvm::llvm_is_multithreaded().

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 103 of file RWMutex.h.

References llvm::llvm_is_multithreaded().

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 114 of file RWMutex.h.

References llvm::llvm_is_multithreaded().

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 125 of file RWMutex.h.

References llvm::llvm_is_multithreaded().


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