From 3bfb95803ba25a04ddb57ebbc0f25e4dec29d7e0 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Wed, 31 Jul 2024 00:13:51 +0200 Subject: [IMP] Can now pass arguments to kernel via handover, new version 0x0113. [IMP] Timeout functions for heap allocation. [IMP] new mp_ and sched_ category of functions. Signed-off-by: Amlal EL Mahrouss --- Kernel/KernelKit/CodeManager.hpp | 4 +--- Kernel/KernelKit/MPManager.hpp | 7 +++++-- Kernel/KernelKit/ProcessScheduler.hxx | 2 +- Kernel/KernelKit/User.hxx | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'Kernel/KernelKit') diff --git a/Kernel/KernelKit/CodeManager.hpp b/Kernel/KernelKit/CodeManager.hpp index 1787c051..5d1b5c86 100644 --- a/Kernel/KernelKit/CodeManager.hpp +++ b/Kernel/KernelKit/CodeManager.hpp @@ -18,8 +18,6 @@ #include #include -#define kUPPNameLen 64 - namespace Kernel { /// @brief Main process entrypoint. @@ -29,5 +27,5 @@ namespace Kernel /// @note This sets up a new stack, anything on the main function that calls the kernel will not be accessible. /// @param main the start of the process. /// @return if the process was started or not. - bool execute_from_image(MainKind main, const char* processName); + bool execute_from_image(MainKind main, const char* processName) noexcept; } // namespace Kernel \ No newline at end of file diff --git a/Kernel/KernelKit/MPManager.hpp b/Kernel/KernelKit/MPManager.hpp index ccd1af37..c54f0aaf 100644 --- a/Kernel/KernelKit/MPManager.hpp +++ b/Kernel/KernelKit/MPManager.hpp @@ -17,6 +17,9 @@ namespace Kernel { + class HardwareThread; + class MPManager; + using ThreadID = UInt32; enum ThreadKind @@ -116,11 +119,11 @@ namespace Kernel /// @brief wakes up thread. /// wakes up thread from hang. - Void rt_wakeup_thread(HAL::StackFramePtr stack); + Void mp_wakeup_thread(HAL::StackFramePtr stack); /// @brief makes thread sleep. /// hooks and hangs thread to prevent code from executing. - Void rt_hang_thread(HAL::StackFramePtr stack); + Void mp_hang_thread(HAL::StackFramePtr stack); } // namespace Kernel #endif // !__INC_MP_MANAGER_HPP__ diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx index 4f9f99f6..5c27af79 100644 --- a/Kernel/KernelKit/ProcessScheduler.hxx +++ b/Kernel/KernelKit/ProcessScheduler.hxx @@ -285,7 +285,7 @@ namespace Kernel STATIC SizeT StartScheduling(); }; - const Int32& rt_get_exit_code() noexcept; + const Int32& sched_get_exit_code(void) noexcept; } // namespace Kernel #include diff --git a/Kernel/KernelKit/User.hxx b/Kernel/KernelKit/User.hxx index c84910c5..ef31328b 100644 --- a/Kernel/KernelKit/User.hxx +++ b/Kernel/KernelKit/User.hxx @@ -90,7 +90,7 @@ namespace Kernel NEWOS_COPY_DELETE(UserView); STATIC UserView* The() noexcept; - Void LogIn(User* user, const Char* password) noexcept; + Bool LogIn(User* user, const Char* password) noexcept; Void LogOff() noexcept; }; } // namespace Kernel -- cgit v1.2.3