libER 0.1.4.2
ELDEN RING API library
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
from::DLKR::DLPlainLightMutex Class Reference

A wrapper around a Windows Critical Section. More...

#include <kernel_runtime.hpp>

Inheritance diagram for from::DLKR::DLPlainLightMutex:
from::DLUT::DLNonCopyable from::DLKR::DLPlainAdaptiveMutex

Public Member Functions

LIBERAPI DLPlainLightMutex (int spin_count) noexcept
 Initialize the Windows Critical Section with an explicit spin count.
 
LIBERAPI void lock () noexcept
 Lock the mutex.
 
LIBERAPI void unlock () noexcept
 Unlock the mutex.
 
LIBERAPI bool try_lock () noexcept
 Try to lock the mutex.
 
 DLPlainLightMutex (DLPlainLightMutex &&) noexcept=delete
 
- Public Member Functions inherited from from::DLUT::DLNonCopyable
 DLNonCopyable (const DLNonCopyable &)=delete
 
DLNonCopyableoperator= (const DLNonCopyable &)=delete
 

Detailed Description

A wrapper around a Windows Critical Section.

Satisfies the C++ Mutex requirement.

Recursive, not TimedLockable.

Constructor & Destructor Documentation

◆ DLPlainLightMutex()

LIBERAPI from::DLKR::DLPlainLightMutex::DLPlainLightMutex ( int  spin_count)
explicitnoexcept

Initialize the Windows Critical Section with an explicit spin count.

Parameters
spin_counthow many times to spin before sleeping

Member Function Documentation

◆ lock()

LIBERAPI void from::DLKR::DLPlainLightMutex::lock ( )
noexcept

Lock the mutex.

Prefer using STL lock objects over calling this explicitly.

◆ try_lock()

LIBERAPI bool from::DLKR::DLPlainLightMutex::try_lock ( )
noexcept

Try to lock the mutex.

Prefer using STL lock objects over calling this explicitly.

Returns
true acquired the lock
false failed to acquire the lock

◆ unlock()

LIBERAPI void from::DLKR::DLPlainLightMutex::unlock ( )
noexcept

Unlock the mutex.

Prefer using STL lock objects over calling this explicitly.


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