SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Core::MutexAtomic Class Reference

#include <swcdb/core/MutexAtomic.h>

+ Inheritance diagram for SWC::Core::MutexAtomic:

Classes

class  scope
 

Public Member Functions

constexpr SWC_CAN_INLINE MutexAtomic () noexcept
 
 MutexAtomic (const MutexAtomic &)=delete
 
 MutexAtomic (MutexAtomic &&)=delete
 
MutexAtomicoperator= (const MutexAtomic &)=delete
 
MutexAtomicoperator= (MutexAtomic &&)=delete
 
 ~MutexAtomic () noexcept
 
SWC_CAN_INLINE bool try_lock () const noexcept
 
SWC_CAN_INLINE void lock () const noexcept
 
void lock (const uint32_t &us_sleep) const noexcept
 
SWC_CAN_INLINE void unlock () const noexcept
 

Private Attributes

std::atomic_flag want
 

Detailed Description

Definition at line 17 of file MutexAtomic.h.

Constructor & Destructor Documentation

◆ MutexAtomic() [1/3]

constexpr SWC_CAN_INLINE SWC::Core::MutexAtomic::MutexAtomic ( )
inlineexplicitconstexprnoexcept

Definition at line 21 of file MutexAtomic.h.

◆ MutexAtomic() [2/3]

SWC::Core::MutexAtomic::MutexAtomic ( const MutexAtomic )
delete

◆ MutexAtomic() [3/3]

SWC::Core::MutexAtomic::MutexAtomic ( MutexAtomic &&  )
delete

◆ ~MutexAtomic()

SWC::Core::MutexAtomic::~MutexAtomic ( )
inlinenoexcept

Definition at line 28 of file MutexAtomic.h.

Member Function Documentation

◆ lock() [1/2]

◆ lock() [2/2]

void SWC::Core::MutexAtomic::lock ( const uint32_t &  us_sleep) const
inlinenoexcept

Definition at line 55 of file MutexAtomic.h.

References want.

◆ operator=() [1/2]

MutexAtomic& SWC::Core::MutexAtomic::operator= ( const MutexAtomic )
delete

◆ operator=() [2/2]

MutexAtomic& SWC::Core::MutexAtomic::operator= ( MutexAtomic &&  )
delete

◆ try_lock()

SWC_CAN_INLINE bool SWC::Core::MutexAtomic::try_lock ( ) const
inlinenoexcept

Definition at line 31 of file MutexAtomic.h.

References want.

Referenced by SWC::Core::MutexSptd::lock(), SWC::Core::MutexSptd::lock_except(), and SWC::Core::MutexSptd::try_full_lock().

+ Here is the caller graph for this function:

◆ unlock()

Member Data Documentation

◆ want

std::atomic_flag SWC::Core::MutexAtomic::want
mutableprivate

Definition at line 97 of file MutexAtomic.h.

Referenced by lock(), try_lock(), and unlock().


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