NeKernel dev
Loading...
Searching...
No Matches
Kernel::BinaryMutex Class Referencefinal

Access control class, which locks a task until one is done. More...

#include <BinaryMutex.h>

Public Member Functions

 BinaryMutex ()=default
 ~BinaryMutex ()=default
bool IsLocked () const
 Checks if process is locked.
bool Unlock () noexcept
 Unlocks the binary mutex.
BOOL WaitForProcess (const Int16 &sec) noexcept
 Wait for process sec until we check if it's free.
bool Lock (USER_PROCESS &process)
 Locks process in the binary mutex.
bool LockOrWait (USER_PROCESS &process, TimerInterface *timer)
 Try lock or wait.

Private Attributes

USER_PROCESSfLockingProcess

Detailed Description

Access control class, which locks a task until one is done.

Constructor & Destructor Documentation

◆ BinaryMutex()

Kernel::BinaryMutex::BinaryMutex ( )
explicitdefault

◆ ~BinaryMutex()

Kernel::BinaryMutex::~BinaryMutex ( )
default

Member Function Documentation

◆ IsLocked()

Bool Kernel::BinaryMutex::IsLocked ( ) const

Checks if process is locked.

◆ Lock()

Bool Kernel::BinaryMutex::Lock ( USER_PROCESS & process)

Locks process in the binary mutex.

◆ LockOrWait()

Bool Kernel::BinaryMutex::LockOrWait ( USER_PROCESS & process,
TimerInterface * timer )

Try lock or wait.

◆ Unlock()

Bool Kernel::BinaryMutex::Unlock ( )
noexcept

Unlocks the binary mutex.

◆ WaitForProcess()

BOOL Kernel::BinaryMutex::WaitForProcess ( const Int16 & sec)
noexcept

Wait for process sec until we check if it's free.

Parameters
secseconds.

Member Data Documentation

◆ fLockingProcess

USER_PROCESS& Kernel::BinaryMutex::fLockingProcess
private

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