From cba3d0b854a1a9fbb0b0c82efb858fa9086b7284 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 27 May 2025 15:09:30 +0200 Subject: fix: DBG_TRAP being called before IDT is setup. refactor: rename HalSyscallEntry to HAL_DISPATCH_ENTRY. also: - Better hashing function in ArchKit: Signed-off-by: Amlal El Mahrouss --- dev/kernel/ArchKit/ArchKit.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dev/kernel/ArchKit') diff --git a/dev/kernel/ArchKit/ArchKit.h b/dev/kernel/ArchKit/ArchKit.h index b6637ec1..09839d98 100644 --- a/dev/kernel/ArchKit/ArchKit.h +++ b/dev/kernel/ArchKit/ArchKit.h @@ -29,8 +29,8 @@ #define kMaxDispatchCallCount (512U) namespace Kernel { -inline SSizeT rt_hash_seed(const Char* seed, int mul) { - SSizeT hash = 0; +inline SizeT rt_hash_seed(const Char* seed, UInt32 mul) { + SizeT hash = 0; for (SSizeT idx = 0; seed[idx] != 0; ++idx) { hash += seed[idx]; @@ -69,7 +69,7 @@ namespace HAL { typedef Kernel::Void (*rt_syscall_proc)(Kernel::VoidPtr); -struct HalSyscallEntry final { +struct HAL_DISPATCH_ENTRY final { Kernel::Int64 fHash; Kernel::Bool fHooked; rt_syscall_proc fProc; @@ -77,9 +77,9 @@ struct HalSyscallEntry final { operator bool() { return fHooked; } }; -inline Kernel::Array kSysCalls; +inline Kernel::Array kSysCalls; -inline Kernel::Array kKernCalls; +inline Kernel::Array kKernCalls; #ifdef __NE_VIRTUAL_MEMORY_SUPPORT__ -- cgit v1.2.3