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 Types

using LockedPtr = USER_PROCESS*

Public Member Functions

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

Private Attributes

LockedPtr fLockingProcess {nullptr}

Detailed Description

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

Member Typedef Documentation

◆ LockedPtr

using Kernel::BinaryMutex::LockedPtr = USER_PROCESS*

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 ( LockedPtr process)

Locks process in the binary mutex.

◆ LockAndWait()

Bool Kernel::BinaryMutex::LockAndWait ( LockedPtr process,
TimerInterface * timer )

Try lock or wait.

◆ Unlock()

Bool Kernel::BinaryMutex::Unlock ( )

Unlocks the binary mutex.

◆ WaitForProcess()

BOOL Kernel::BinaryMutex::WaitForProcess ( const UInt32 & sec)

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

Parameters
secseconds.

Member Data Documentation

◆ fLockingProcess

LockedPtr Kernel::BinaryMutex::fLockingProcess {nullptr}
private

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