diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-23 08:22:38 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-23 08:22:38 +0100 |
| commit | 4ece9e7d55734ca14c87f7fb6b708aa086b4d3c0 (patch) | |
| tree | 9c40df0115760adf3b204764f01bb4a8ada324c0 /dev/kernel/KernelKit | |
| parent | c81208be24a34bd36fc9e01fdbdc146440d7c9e7 (diff) | |
fix: sem: fix condition in 'rtl_sem_is_valid' as it was to strict.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/KernelKit')
| -rw-r--r-- | dev/kernel/KernelKit/Semaphore.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dev/kernel/KernelKit/Semaphore.h b/dev/kernel/KernelKit/Semaphore.h index ee29eeae..0d2b84da 100644 --- a/dev/kernel/KernelKit/Semaphore.h +++ b/dev/kernel/KernelKit/Semaphore.h @@ -33,7 +33,7 @@ typedef UInt64 Semaphore[kSemaphoreCount]; /// @brief Checks if the semaphore is valid. inline BOOL rtl_sem_is_valid(const Semaphore& sem, UInt64 owner = 0) { - return sem[kSemaphoreOwnerIndex] == owner && sem[kSemaphoreCountIndex] > 0; + return sem[kSemaphoreOwnerIndex] == owner && sem[kSemaphoreCountIndex] >= 0; } /// @brief Releases the semaphore, resetting its owner and count. |
