YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::detail::fiber::RecursiveMutex Class Reference

#include <recursive_mutex.hpp>

Inheritance diagram for yaclib::detail::fiber::RecursiveMutex:
[legend]
Collaboration diagram for yaclib::detail::fiber::RecursiveMutex:
[legend]

Public Types

using native_handle_type = void *
 

Public Member Functions

 RecursiveMutex ()=default
 
 ~RecursiveMutex () noexcept=default
 
 RecursiveMutex (const RecursiveMutex &)=delete
 
RecursiveMutexoperator= (const RecursiveMutex &)=delete
 
void lock ()
 
bool try_lock () noexcept
 
void unlock () noexcept
 
native_handle_type native_handle ()
 

Protected Member Functions

void LockHelper ()
 

Protected Attributes

FiberQueue _queue
 
FiberBase::Id _owner_id {0}
 
std::uint32_t _occupied_count {0}
 

Detailed Description

Definition at line 7 of file recursive_mutex.hpp.

Member Typedef Documentation

◆ native_handle_type

Constructor & Destructor Documentation

◆ RecursiveMutex() [1/2]

yaclib::detail::fiber::RecursiveMutex::RecursiveMutex ( )
default

◆ ~RecursiveMutex()

yaclib::detail::fiber::RecursiveMutex::~RecursiveMutex ( )
defaultnoexcept

◆ RecursiveMutex() [2/2]

yaclib::detail::fiber::RecursiveMutex::RecursiveMutex ( const RecursiveMutex )
delete

Member Function Documentation

◆ lock()

void yaclib::detail::fiber::RecursiveMutex::lock ( )

◆ LockHelper()

void yaclib::detail::fiber::RecursiveMutex::LockHelper ( )
protected

Definition at line 28 of file recursive_mutex.cpp.

References _occupied_count, _owner_id, and yaclib::fault::Scheduler::GetId().

Referenced by lock(), and try_lock().

◆ native_handle()

RecursiveMutex::native_handle_type yaclib::detail::fiber::RecursiveMutex::native_handle ( )
inline

Definition at line 33 of file recursive_mutex.cpp.

◆ operator=()

RecursiveMutex & yaclib::detail::fiber::RecursiveMutex::operator= ( const RecursiveMutex )
delete

◆ try_lock()

bool yaclib::detail::fiber::RecursiveMutex::try_lock ( )
noexcept

◆ unlock()

void yaclib::detail::fiber::RecursiveMutex::unlock ( )
noexcept

Definition at line 21 of file recursive_mutex.cpp.

References _occupied_count, _owner_id, and YACLIB_DEBUG.

Member Data Documentation

◆ _occupied_count

std::uint32_t yaclib::detail::fiber::RecursiveMutex::_occupied_count {0}
protected

Definition at line 28 of file recursive_mutex.hpp.

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

◆ _owner_id

FiberBase::Id yaclib::detail::fiber::RecursiveMutex::_owner_id {0}
protected

Definition at line 27 of file recursive_mutex.hpp.

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

◆ _queue

FiberQueue yaclib::detail::fiber::RecursiveMutex::_queue
protected

Definition at line 26 of file recursive_mutex.hpp.

Referenced by lock().


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