diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-23 08:32:09 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-23 08:32:09 +0100 |
| commit | ca7b843f1c15dd479d287f93221cd23e74d94385 (patch) | |
| tree | 2631513bc6485916076d848be02e868ead5e95ae /dev/kernel | |
| parent | cab7131a9eab7f06ba39260be477a1b4532705d8 (diff) | |
feat: new 'kErrorAccessDenied' type for semaphore api.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel')
| -rw-r--r-- | dev/kernel/KernelKit/KPC.h | 3 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/Semaphore.h | 4 |
2 files changed, 4 insertions, 3 deletions
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; } |
