LLVM  8.0.1
Public Member Functions | List of all members
llvm::sys::RWMutexImpl Class Reference

Platform agnostic RWMutex class. More...

#include "llvm/Support/RWMutex.h"

Public Member Functions

 ~RWMutexImpl ()
 Releases and removes the lock Destructor. More...
 
Constructors
 RWMutexImpl ()
 Initializes the lock but doesn't acquire it. More...
 
Do Not Implement
 RWMutexImpl (const RWMutexImpl &original)=delete
 
RWMutexImploperator= (const RWMutexImpl &)=delete
 
Methods
bool reader_acquire ()
 Attempts to unconditionally acquire the lock in reader mode. More...
 
bool reader_release ()
 Attempts to release the lock in reader mode. More...
 
bool writer_acquire ()
 Attempts to unconditionally acquire the lock in reader mode. More...
 
bool writer_release ()
 Attempts to release the lock in writer mode. More...
 

Detailed Description

Platform agnostic RWMutex class.

Definition at line 25 of file RWMutex.h.

Constructor & Destructor Documentation

◆ RWMutexImpl() [1/2]

RWMutexImpl::RWMutexImpl ( )
explicit

Initializes the lock but doesn't acquire it.

Default Constructor.

Definition at line 49 of file RWMutex.cpp.

References assert(), and llvm::safe_malloc().

◆ RWMutexImpl() [2/2]

llvm::sys::RWMutexImpl::RWMutexImpl ( const RWMutexImpl original)
delete

◆ ~RWMutexImpl()

RWMutexImpl::~RWMutexImpl ( )

Releases and removes the lock Destructor.

Definition at line 70 of file RWMutex.cpp.

References assert().

Member Function Documentation

◆ operator=()

RWMutexImpl& llvm::sys::RWMutexImpl::operator= ( const RWMutexImpl )
delete

◆ reader_acquire()

bool RWMutexImpl::reader_acquire ( )

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. Unconditionally acquire the lock in reader mode.

Definition at line 79 of file RWMutex.cpp.

References assert().

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

◆ reader_release()

bool RWMutexImpl::reader_release ( )

Attempts to release the lock in reader mode.

Returns
false if any kind of error occurs, true otherwise. Unconditionally release the lock in reader mode.

Definition at line 89 of file RWMutex.cpp.

References assert().

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

◆ writer_acquire()

bool RWMutexImpl::writer_acquire ( )

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. Unconditionally acquire the lock in writer mode.

Definition at line 99 of file RWMutex.cpp.

References assert().

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

◆ writer_release()

bool RWMutexImpl::writer_release ( )

Attempts to release the lock in writer mode.

Returns
false if any kind of error occurs, true otherwise. Unconditionally release the lock in write mode.

Definition at line 109 of file RWMutex.cpp.

References assert().

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


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