LLVM 20.0.0git
Public Member Functions | List of all members
llvm::sys::SmartMutex< mt_only > Class Template Reference

SmartMutex - A 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. More...

#include "llvm/Support/Mutex.h"

Inheritance diagram for llvm::sys::SmartMutex< mt_only >:
Inheritance graph
[legend]

Public Member Functions

bool lock ()
 
bool unlock ()
 
bool try_lock ()
 

Detailed Description

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

SmartMutex - A 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 28 of file Mutex.h.

Member Function Documentation

◆ lock()

template<bool mt_only>
bool llvm::sys::SmartMutex< mt_only >::lock ( )
inline

Definition at line 33 of file Mutex.h.

References impl, and llvm::llvm_is_multithreaded().

Referenced by llvm::orc::MapperJITLinkMemoryManager::allocate().

◆ try_lock()

template<bool mt_only>
bool llvm::sys::SmartMutex< mt_only >::try_lock ( )
inline

Definition at line 58 of file Mutex.h.

References impl, and llvm::llvm_is_multithreaded().

◆ unlock()

template<bool mt_only>
bool llvm::sys::SmartMutex< mt_only >::unlock ( )
inline

Definition at line 45 of file Mutex.h.

References assert(), impl, and llvm::llvm_is_multithreaded().

Referenced by llvm::orc::MapperJITLinkMemoryManager::allocate().


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