diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-10-10 10:30:38 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-10-10 10:30:38 +0200 |
| commit | 212c57ea05bf918dc26fe8864ad617f2f6259cea (patch) | |
| tree | 85b51997582d9b21469549c2644308588582d744 | |
| parent | 59f37ac002635171892925f163783689ec23c1fc (diff) | |
feat: kernel: dispatch structures have two new methods.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | dev/kernel/ArchKit/ArchKit.h | 6 | ||||
| -rw-r--r-- | dev/kernel/CFKit/GUIDWrapper.h | 5 | ||||
| -rw-r--r-- | dev/kernel/src/UserMgr.cc | 2 | ||||
| -rw-r--r-- | dev/kernel/src/UserProcessScheduler.cc | 1 | ||||
| -rw-r--r-- | dev/libSystem/src/JailCalls.cc | 4 | ||||
| -rw-r--r-- | dev/libSystem/src/VerifyCalls.cc | 2 |
6 files changed, 12 insertions, 8 deletions
diff --git a/dev/kernel/ArchKit/ArchKit.h b/dev/kernel/ArchKit/ArchKit.h index 2042bded..9c45b6bb 100644 --- a/dev/kernel/ArchKit/ArchKit.h +++ b/dev/kernel/ArchKit/ArchKit.h @@ -75,6 +75,9 @@ struct HAL_DISPATCH_ENTRY final { Kernel::Bool fHooked; rt_syscall_proc fProc; + BOOL IsKernCall() { return NO; } + BOOL IsSysCall() { return YES; } + operator bool() { return fHooked; } }; @@ -86,6 +89,9 @@ struct HAL_KERNEL_DISPATCH_ENTRY final { Kernel::Bool fHooked; rt_kerncall_proc fProc; + BOOL IsKernCall() { return YES; } + BOOL IsSysCall() { return NO; } + operator bool() { return fHooked; } }; diff --git a/dev/kernel/CFKit/GUIDWrapper.h b/dev/kernel/CFKit/GUIDWrapper.h index 05cb4754..14a96fde 100644 --- a/dev/kernel/CFKit/GUIDWrapper.h +++ b/dev/kernel/CFKit/GUIDWrapper.h @@ -16,7 +16,7 @@ /// @brief eXtended Resource Namespace namespace Kernel::CF::XRN { -union GUIDSequence { +union GUIDSequence final { alignas(8) UShort fU8[16]; alignas(8) UShort fU16[8]; alignas(8) UInt fU32[4]; @@ -36,8 +36,7 @@ class GUID final { ~GUID() = default; public: - GUID& operator=(const GUID&) = default; - GUID(const GUID&) = default; + NE_COPY_DEFAULT(GUID) public: GUIDSequence& operator->() noexcept { return fUUID; } diff --git a/dev/kernel/src/UserMgr.cc b/dev/kernel/src/UserMgr.cc index 9db1ca4d..5ee2aa33 100644 --- a/dev/kernel/src/UserMgr.cc +++ b/dev/kernel/src/UserMgr.cc @@ -39,7 +39,7 @@ namespace Detail { kout << "user_fnv_generator: Hashing user password...\r"; const UInt64 kFnvOffsetBasis = 0xcbf29ce484222325ULL; - const UInt64 fFnvPrime = 0x100000001b3ULL; + const UInt64 fFnvPrime = 0x100000001b3ULL; UInt64 hash = kFnvOffsetBasis; diff --git a/dev/kernel/src/UserProcessScheduler.cc b/dev/kernel/src/UserProcessScheduler.cc index ad6263c8..af54799e 100644 --- a/dev/kernel/src/UserProcessScheduler.cc +++ b/dev/kernel/src/UserProcessScheduler.cc @@ -21,7 +21,6 @@ #include <KernelKit/ProcessScheduler.h> #include <NeKit/KString.h> #include <NeKit/Utils.h> -#include <KernelKit/KPC.h> #include <SignalKit/SignalGen.h> ///! BUGS: 0 diff --git a/dev/libSystem/src/JailCalls.cc b/dev/libSystem/src/JailCalls.cc index 85796e9f..5cb47bb5 100644 --- a/dev/libSystem/src/JailCalls.cc +++ b/dev/libSystem/src/JailCalls.cc @@ -5,13 +5,13 @@ ------------------------------------------- */ #include <libSystem/SystemKit/Err.h> +#include <libSystem/SystemKit/Jail.h> #include <libSystem/SystemKit/Syscall.h> #include <libSystem/SystemKit/System.h> -#include <libSystem/SystemKit/Jail.h> #include <libSystem/SystemKit/Verify.h> using namespace LibSystem; IMPORT_C struct JAIL* JailGetCurrent(Void) { - return (struct JAIL*)libsys_syscall_arg_1(SYSCALL_HASH("JailGetCurrent")); + return (struct JAIL*) libsys_syscall_arg_1(SYSCALL_HASH("JailGetCurrent")); }
\ No newline at end of file diff --git a/dev/libSystem/src/VerifyCalls.cc b/dev/libSystem/src/VerifyCalls.cc index 83617ae0..078f921b 100644 --- a/dev/libSystem/src/VerifyCalls.cc +++ b/dev/libSystem/src/VerifyCalls.cc @@ -5,8 +5,8 @@ ------------------------------------------- */ #include <libSystem/SystemKit/Err.h> -#include <libSystem/SystemKit/Verify.h> #include <libSystem/SystemKit/Syscall.h> +#include <libSystem/SystemKit/Verify.h> using namespace LibSystem; |
