From 6d16db11d91c5fdf302af54e8e797dcbed8c9c71 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 23 Jul 2025 08:33:49 +0100 Subject: feat: new 'kErrorUnavailable' type and semaphore API breaking changes. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/KPC.h | 1 + dev/kernel/KernelKit/Semaphore.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'dev') diff --git a/dev/kernel/KernelKit/KPC.h b/dev/kernel/KernelKit/KPC.h index b55d98fc..794197e2 100644 --- a/dev/kernel/KernelKit/KPC.h +++ b/dev/kernel/KernelKit/KPC.h @@ -67,6 +67,7 @@ inline constexpr KPCError kErrorDmaExhausted = 66; inline constexpr KPCError kErrorOutOfBitMapMemory = 67; inline constexpr KPCError kErrorTimeout = 68; inline constexpr KPCError kErrorAccessDenied = 69; +inline constexpr KPCError kErrorUnavailable = 70; /// Generic errors. inline constexpr KPCError kErrorUnimplemented = -1; diff --git a/dev/kernel/KernelKit/Semaphore.h b/dev/kernel/KernelKit/Semaphore.h index 6905c8cc..df410208 100644 --- a/dev/kernel/KernelKit/Semaphore.h +++ b/dev/kernel/KernelKit/Semaphore.h @@ -75,7 +75,7 @@ inline BOOL rtl_sem_wait(Semaphore& sem, UInt64 owner, UInt64 timeout, BOOL* con if (!condition || *condition) { if (sem[kSemaphoreCountIndex] == 0) { - err_global_get() = kErrorAccessDenied; + err_global_get() = kErrorUnavailable; return FALSE; } @@ -91,7 +91,7 @@ inline BOOL rtl_sem_wait(Semaphore& sem, UInt64 owner, UInt64 timeout, BOOL* con if (ret) { if (!condition || *condition) { if (sem[kSemaphoreCountIndex] == 0) { - err_global_get() = kErrorAccessDenied; + err_global_get() = kErrorUnavailable; return FALSE; } -- cgit v1.2.3