summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-23 08:33:49 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-23 08:33:49 +0100
commit6d16db11d91c5fdf302af54e8e797dcbed8c9c71 (patch)
tree688efbf795b36ccc9d44e459038813e3fc524c3c /dev/kernel/KernelKit
parentca7b843f1c15dd479d287f93221cd23e74d94385 (diff)
feat: new 'kErrorUnavailable' type and semaphore API breaking changes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/KernelKit')
-rw-r--r--dev/kernel/KernelKit/KPC.h1
-rw-r--r--dev/kernel/KernelKit/Semaphore.h4
2 files changed, 3 insertions, 2 deletions
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;
}