summaryrefslogtreecommitdiffhomepage
path: root/Kernel/KernelKit/LPC.hxx
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-07-29 08:30:04 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-07-29 08:30:04 +0000
commit0d661d2587046d3fc078bc15a089b94489c08a8d (patch)
tree5937d6b70ba935b419eed3b309abd2ced464ffe6 /Kernel/KernelKit/LPC.hxx
parentc4023005e029ae092dad2689564c490580dd5c28 (diff)
parent83a3ac27ddd9a02ad698407515b0e708197b2aac (diff)
Merged in MHR-36 (pull request #18)
[MHR-36] Last commit on ticket.
Diffstat (limited to 'Kernel/KernelKit/LPC.hxx')
-rw-r--r--Kernel/KernelKit/LPC.hxx56
1 files changed, 56 insertions, 0 deletions
diff --git a/Kernel/KernelKit/LPC.hxx b/Kernel/KernelKit/LPC.hxx
new file mode 100644
index 00000000..fc322475
--- /dev/null
+++ b/Kernel/KernelKit/LPC.hxx
@@ -0,0 +1,56 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.hpp>
+
+/// @file LPC.hxx
+/// @brief Local Process Codes.
+
+#define ErrLocalIsOk() (Kernel::ProcessScheduler::The().Leak().TheCurrent().Leak().GetLocalCode() == Kernel::kErrorSuccess)
+#define ErrLocalFailed() (Kernel::ProcessScheduler::The().Leak().TheCurrent().Leak().GetLocalCode() != Kernel::kErrorSuccess)
+#define ErrLocal() Kernel::ProcessScheduler::The().Leak().TheCurrent().Leak().GetLocalCode()
+
+namespace Kernel
+{
+ typedef Int32 HError;
+
+ inline constexpr HError kErrorSuccess = 0;
+ inline constexpr HError kErrorExecutable = 33;
+ inline constexpr HError kErrorExecutableLib = 34;
+ inline constexpr HError kErrorFileNotFound = 35;
+ inline constexpr HError kErrorDirectoryNotFound = 36;
+ inline constexpr HError kErrorDiskReadOnly = 37;
+ inline constexpr HError kErrorDiskIsFull = 38;
+ inline constexpr HError kErrorProcessFault = 39;
+ inline constexpr HError kErrorSocketHangUp = 40;
+ inline constexpr HError kErrorThreadLocalStorage = 41;
+ inline constexpr HError kErrorMath = 42;
+ inline constexpr HError kErrorNoNetwork = 43;
+ inline constexpr HError kErrorHeapOutOfMemory = 44;
+ inline constexpr HError kErrorNoSuchDisk = 45;
+ inline constexpr HError kErrorFileExists = 46;
+ inline constexpr HError kErrorFormatFailed = 47;
+ inline constexpr HError kErrorNetworkTimeout = 48;
+ inline constexpr HError kErrorInternal = 49;
+ inline constexpr HError kErrorForkAlreadyExists = 50;
+ inline constexpr HError kErrorOutOfTeamSlot = 51;
+ inline constexpr HError kErrorHeapNotPresent = 52;
+ inline constexpr HError kErrorNoEntrypoint = 53;
+ inline constexpr HError kErrorDiskIsCorrupted = 54;
+ inline constexpr HError kErrorDisk = 55;
+ inline constexpr HError kErrorInvalidData = 56;
+ inline constexpr HError kErrorAsync = 57;
+ inline constexpr HError kErrorNonBlocking = 58;
+ inline constexpr HError kErrorIPC = 59;
+ inline constexpr HError kErrorSign = 60;
+ inline constexpr HError kErrorInvalidCreds = 61;
+ inline constexpr HError kErrorUnimplemented = 0;
+
+ Void err_bug_check_raise(void) noexcept;
+ Boolean err_bug_check(void) noexcept;
+} // namespace Kernel