libstdc++
Collaboration diagram for Mutexes:

Classes

struct  std::adopt_lock_t
 
struct  std::defer_lock_t
 
class  std::lock_guard< _Mutex >
 
class  std::mutex
 
struct  std::try_to_lock_t
 
class  std::unique_lock< _Mutex >
 

Typedefs

typedef __gthread_mutex_t std::__mutex_base::__native_type
 
typedef _Mutex std::lock_guard< _Mutex >::mutex_type
 
typedef __native_type * std::mutex::native_handle_type
 

Functions

 std::__mutex_base::__mutex_base (const __mutex_base &)=delete
 
 std::lock_guard< _Mutex >::lock_guard (const lock_guard &)=delete
 
 std::lock_guard< _Mutex >::lock_guard (mutex_type &__m)
 
 std::lock_guard< _Mutex >::lock_guard (mutex_type &__m, adopt_lock_t) noexcept
 
 std::mutex::mutex (const mutex &)=delete
 
void std::mutex::lock ()
 
native_handle_type std::mutex::native_handle () noexcept
 
__mutex_base & std::__mutex_base::operator= (const __mutex_base &)=delete
 
lock_guardstd::lock_guard< _Mutex >::operator= (const lock_guard &)=delete
 
mutexstd::mutex::operator= (const mutex &)=delete
 
bool std::mutex::try_lock () noexcept
 
void std::mutex::unlock ()
 

Variables

__native_type std::__mutex_base::_M_mutex
 
_GLIBCXX17_INLINE constexpr adopt_lock_t std::adopt_lock
 
_GLIBCXX17_INLINE constexpr defer_lock_t std::defer_lock
 
_GLIBCXX17_INLINE constexpr try_to_lock_t std::try_to_lock
 
using std::__shared_timed_mutex_base = __shared_mutex_cv
 
template<typename _Mutex >
void std::swap (shared_lock< _Mutex > &__x, shared_lock< _Mutex > &__y) noexcept
 
#define __cpp_lib_shared_timed_mutex
 

Detailed Description

Classes for mutex support.

Macro Definition Documentation

◆ __cpp_lib_shared_timed_mutex

#define __cpp_lib_shared_timed_mutex

Swap specialization for shared_lock.

Definition at line 56 of file shared_mutex.

Typedef Documentation

◆ __native_type

typedef __gthread_mutex_t std::__mutex_base::__native_type
protected

Definition at line 60 of file std_mutex.h.

◆ __shared_timed_mutex_base

Swap specialization for shared_lock.

Definition at line 438 of file shared_mutex.

◆ mutex_type

template<typename _Mutex >
typedef _Mutex std::lock_guard< _Mutex >::mutex_type

Definition at line 156 of file std_mutex.h.

◆ native_handle_type

typedef __native_type* std::mutex::native_handle_type

Definition at line 86 of file std_mutex.h.

Function Documentation

◆ __mutex_base()

std::__mutex_base::__mutex_base ( )
inlineprotectednoexcept

Definition at line 69 of file std_mutex.h.

◆ lock_guard() [1/2]

template<typename _Mutex >
std::lock_guard< _Mutex >::lock_guard ( mutex_type &  __m)
inlineexplicit

Definition at line 158 of file std_mutex.h.

◆ lock_guard() [2/2]

template<typename _Mutex >
std::lock_guard< _Mutex >::lock_guard ( mutex_type &  __m,
adopt_lock_t   
)
inlinenoexcept

Definition at line 161 of file std_mutex.h.

◆ ~__mutex_base()

std::__mutex_base::~__mutex_base ( )
inlineprotectednoexcept

Definition at line 75 of file std_mutex.h.

◆ ~lock_guard()

template<typename _Mutex >
std::lock_guard< _Mutex >::~lock_guard ( )
inline

Definition at line 164 of file std_mutex.h.

◆ lock()

void std::mutex::lock ( )
inline

Definition at line 98 of file std_mutex.h.

◆ native_handle()

native_handle_type std::mutex::native_handle ( )
inlinenoexcept

Definition at line 122 of file std_mutex.h.

◆ swap()

template<typename _Mutex >
void std::swap ( shared_lock< _Mutex > &  __x,
shared_lock< _Mutex > &  __y 
)
noexcept

Swap specialization for shared_lock.

Definition at line 759 of file shared_mutex.

◆ try_lock()

bool std::mutex::try_lock ( )
inlinenoexcept

Definition at line 108 of file std_mutex.h.

◆ unlock()

void std::mutex::unlock ( )
inline

Definition at line 115 of file std_mutex.h.

Variable Documentation

◆ _M_mutex

__native_type std::__mutex_base::_M_mutex
protected

Definition at line 67 of file std_mutex.h.

◆ adopt_lock

_GLIBCXX17_INLINE constexpr adopt_lock_t std::adopt_lock
constexpr

Tag used to make a scoped lock take ownership of a locked mutex.

Definition at line 145 of file std_mutex.h.

◆ defer_lock

_GLIBCXX17_INLINE constexpr defer_lock_t std::defer_lock
constexpr

Tag used to prevent a scoped lock from acquiring ownership of a mutex.

Definition at line 139 of file std_mutex.h.

◆ try_to_lock

_GLIBCXX17_INLINE constexpr try_to_lock_t std::try_to_lock
constexpr

Tag used to prevent a scoped lock from blocking if a mutex is locked.

Definition at line 142 of file std_mutex.h.