LLVM API Documentation

Public Member Functions
llvm::unique_lock< MutexT > Class Template Reference

Guard a section of code with a mutex. More...

#include <UniqueLock.h>

List of all members.

Public Member Functions

 unique_lock ()
 unique_lock (MutexT &m)
void operator= (unique_lock &&o)
 ~unique_lock ()
void lock ()
void unlock ()
bool owns_lock ()

Detailed Description

template<typename MutexT>
class llvm::unique_lock< MutexT >

Guard a section of code with a mutex.

A pared-down imitation of std::unique_lock from C++11. Contrary to the name, it's really more of a wrapper for a lock. It may or may not have an associated mutex, which is guaranteed to be locked upon creation and unlocked after destruction. unique_lock can also unlock the mutex and re-lock it freely during its lifetime.

Definition at line 28 of file UniqueLock.h.


Constructor & Destructor Documentation

template<typename MutexT>
llvm::unique_lock< MutexT >::unique_lock ( ) [inline]

Definition at line 35 of file UniqueLock.h.

template<typename MutexT>
llvm::unique_lock< MutexT >::unique_lock ( MutexT &  m) [inline, explicit]

Definition at line 36 of file UniqueLock.h.

template<typename MutexT>
llvm::unique_lock< MutexT >::~unique_lock ( ) [inline]

Definition at line 47 of file UniqueLock.h.

References llvm::unique_lock< MutexT >::owns_lock().


Member Function Documentation

template<typename MutexT>
void llvm::unique_lock< MutexT >::lock ( ) [inline]

Definition at line 49 of file UniqueLock.h.

template<typename MutexT>
void llvm::unique_lock< MutexT >::operator= ( unique_lock< MutexT > &&  o) [inline]

Definition at line 38 of file UniqueLock.h.

References llvm::unique_lock< MutexT >::owns_lock().

template<typename MutexT>
bool llvm::unique_lock< MutexT >::owns_lock ( ) [inline]
template<typename MutexT>
void llvm::unique_lock< MutexT >::unlock ( ) [inline]

Definition at line 56 of file UniqueLock.h.

Referenced by llvm::Interpreter::callExternalFunction().


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