NeKernel dev
|
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_PROCESS & | fLockingProcess |
Access control class, which locks a task until one is done.
|
explicitdefault |
|
default |
Bool Kernel::BinaryMutex::IsLocked | ( | ) | const |
Checks if process is locked.
Bool Kernel::BinaryMutex::Lock | ( | USER_PROCESS & | process | ) |
Locks process in the binary mutex.
Bool Kernel::BinaryMutex::LockOrWait | ( | USER_PROCESS & | process, |
TimerInterface * | timer ) |
Try lock or wait.
|
noexcept |
Unlocks the binary mutex.
Wait for process sec until we check if it's free.
sec | seconds. |
|
private |