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