LLVM API Documentation

Public Member Functions
llvm::sys::RWMutexImpl Class Reference

Platform agnostic RWMutex class. More...

#include <RWMutex.h>

List of all members.

Public Member Functions

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.
Constructors
 RWMutexImpl ()
 Default Constructor.
 ~RWMutexImpl ()
 Destructor.

Detailed Description

Platform agnostic RWMutex class.

Definition at line 26 of file RWMutex.h.


Constructor & Destructor Documentation

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.

Destructor.

Releases and removes the lock

Definition at line 68 of file RWMutex.cpp.

References llvm::LibFunc::free.


Member Function Documentation

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< true >::lock_shared().

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< true >::unlock_shared().

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< true >::lock().

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< true >::unlock().


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