From 386d9a5bffcd66633e4c3c72eb6cb25722796c92 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 24 May 2025 10:59:49 +0200 Subject: feat(kernel): Better syscall routing, also added new tools. what: - ping, manual have been added. - Rework RtlCurrentPID to SchedGetCurrentProcessID. - Cleanup codebase overall. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/UserProcessScheduler.inl | 6 ++++- dev/kernel/KernelKit/ZXD.h | 37 +++++++++++++++++++++++++++ dev/kernel/KernelKit/Zxd.h | 37 --------------------------- 3 files changed, 42 insertions(+), 38 deletions(-) create mode 100644 dev/kernel/KernelKit/ZXD.h delete mode 100644 dev/kernel/KernelKit/Zxd.h (limited to 'dev/kernel/KernelKit') diff --git a/dev/kernel/KernelKit/UserProcessScheduler.inl b/dev/kernel/KernelKit/UserProcessScheduler.inl index 156aa0b5..df35e037 100644 --- a/dev/kernel/KernelKit/UserProcessScheduler.inl +++ b/dev/kernel/KernelKit/UserProcessScheduler.inl @@ -11,13 +11,17 @@ /// @author Amlal El Mahrouss (amlal@nekernel.org) /// @date Tue Apr 22 22:01:07 CEST 2025 +#ifndef INC_PROCESS_SCHEDULER_H +#include +#endif // INC_PROCESS_SCHEDULER_H + namespace Kernel { /***********************************************************************************/ /** @brief Free pointer from usage. */ /***********************************************************************************/ template -Boolean USER_PROCESS::Delete(ErrorOr ptr) { +BOOL USER_PROCESS::Delete(ErrorOr ptr) { if (!ptr) return No; if (!this->HeapTree) { diff --git a/dev/kernel/KernelKit/ZXD.h b/dev/kernel/KernelKit/ZXD.h new file mode 100644 index 00000000..d2456f51 --- /dev/null +++ b/dev/kernel/KernelKit/ZXD.h @@ -0,0 +1,37 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include + +namespace ZXD { +using namespace Kernel; + +struct ZXD_EXEC_HEADER; +struct ZXD_STUB_HEADER; + +/// @brief ZXD executable header +/// @details This header is used to identify ZXD executable files. +struct ZXD_EXEC_HEADER { + UInt32 fMagic; + UInt32 fVersion; + UInt32 fFlags; + UInt32 fHdrSize; + UInt32 fCRC32; + UInt32 fAssigneeSignature; + UInt32 fIssuerSingature; +}; + +/// @brief ZXD stub header +/// @details This header is used to identify ZXD stub files. It contains the size of the stub, the +/// offset of the stub, and the CRC32 checksum of the stub. +struct ZXD_STUB_HEADER : public ZXD_EXEC_HEADER { + UInt32 fStubSize; + UInt32 fStubOffset; + UInt32 fStubCRC32; +}; +} // namespace ZXD \ No newline at end of file diff --git a/dev/kernel/KernelKit/Zxd.h b/dev/kernel/KernelKit/Zxd.h deleted file mode 100644 index d2456f51..00000000 --- a/dev/kernel/KernelKit/Zxd.h +++ /dev/null @@ -1,37 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. - -------------------------------------------- */ - -#pragma once - -#include - -namespace ZXD { -using namespace Kernel; - -struct ZXD_EXEC_HEADER; -struct ZXD_STUB_HEADER; - -/// @brief ZXD executable header -/// @details This header is used to identify ZXD executable files. -struct ZXD_EXEC_HEADER { - UInt32 fMagic; - UInt32 fVersion; - UInt32 fFlags; - UInt32 fHdrSize; - UInt32 fCRC32; - UInt32 fAssigneeSignature; - UInt32 fIssuerSingature; -}; - -/// @brief ZXD stub header -/// @details This header is used to identify ZXD stub files. It contains the size of the stub, the -/// offset of the stub, and the CRC32 checksum of the stub. -struct ZXD_STUB_HEADER : public ZXD_EXEC_HEADER { - UInt32 fStubSize; - UInt32 fStubOffset; - UInt32 fStubCRC32; -}; -} // namespace ZXD \ No newline at end of file -- cgit v1.2.3