|
NeKernel dev
|
Semaphore structure and functions for synchronization in the kernel. More...
Go to the source code of this file.
Namespaces | |
| namespace | Kernel |
| UPS inline definitions. | |
Macros | |
| #define | kSemaphoreOwnerIndex (0U) |
| #define | kSemaphoreCountIndex (1U) |
| #define | kSemaphoreCount (2U) |
| #define | kSemaphoreIncrementOwner(sem) |
| #define | kSemaphoreDecrementOwner(sem) |
Typedefs | |
| typedef UInt64 | Kernel::SemaphoreArr[kSemaphoreCount] |
| Semaphore structure used for synchronization. | |
Functions | |
| BOOL | Kernel::rtl_sem_is_valid (const SemaphoreArr &sem, UInt64 owner=0) |
| Checks if the semaphore is valid. | |
| BOOL | Kernel::rtl_sem_release (SemaphoreArr &sem) |
| Releases the semaphore, resetting its owner and count. | |
| BOOL | Kernel::rtl_sem_acquire (SemaphoreArr &sem, UInt64 owner) |
| Initializes the semaphore with an owner and a count of zero. | |
| BOOL | Kernel::rtl_sem_wait (SemaphoreArr &sem, UInt64 owner, UInt64 timeout, BOOL *condition=nullptr) |
| Waits for the semaphore to be available, blocking until it is. | |
Semaphore structure and functions for synchronization in the kernel.
| #define kSemaphoreCount (2U) |
| #define kSemaphoreCountIndex (1U) |
| #define kSemaphoreDecrementOwner | ( | sem | ) |
| #define kSemaphoreIncrementOwner | ( | sem | ) |
| #define kSemaphoreOwnerIndex (0U) |