From ca7b843f1c15dd479d287f93221cd23e74d94385 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 23 Jul 2025 08:32:09 +0100 Subject: feat: new 'kErrorAccessDenied' type for semaphore api. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/KPC.h | 3 ++- dev/kernel/KernelKit/Semaphore.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'dev/kernel/KernelKit') diff --git a/dev/kernel/KernelKit/KPC.h b/dev/kernel/KernelKit/KPC.h index 836be458..b55d98fc 100644 --- a/dev/kernel/KernelKit/KPC.h +++ b/dev/kernel/KernelKit/KPC.h @@ -65,7 +65,8 @@ inline constexpr KPCError kErrorFileLocked = 64; inline constexpr KPCError kErrorDiskIsTooTiny = 65; inline constexpr KPCError kErrorDmaExhausted = 66; inline constexpr KPCError kErrorOutOfBitMapMemory = 67; -inline constexpr KPCError kErrorTimeout = 68; +inline constexpr KPCError kErrorTimeout = 68; +inline constexpr KPCError kErrorAccessDenied = 69; /// Generic errors. inline constexpr KPCError kErrorUnimplemented = -1; diff --git a/dev/kernel/KernelKit/Semaphore.h b/dev/kernel/KernelKit/Semaphore.h index 7957ce31..6905c8cc 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() = kErrorTimeout; + err_global_get() = kErrorAccessDenied; 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() = kErrorTimeout; + err_global_get() = kErrorAccessDenied; return FALSE; } -- cgit v1.2.3