From 6a30f42d5dcd0f944262147b2806db6c14fe7ffc Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 15 May 2025 13:56:17 +0200 Subject: feat(kernel): Finalizing the first version of the user scheduler. other: - Removed DmaPool into its own Kit. - ApplicationProcessor unit has been cleaned up. - Rename functions of MemoryMgr. - Use KIB instead of MIBs of stack. - Cleanup parts of the scheduler, and hw scheduler. - Use UD handler for INT 6. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/UserProcessScheduler.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dev/kernel/KernelKit/UserProcessScheduler.h') diff --git a/dev/kernel/KernelKit/UserProcessScheduler.h b/dev/kernel/KernelKit/UserProcessScheduler.h index a638f0dc..717788e9 100644 --- a/dev/kernel/KernelKit/UserProcessScheduler.h +++ b/dev/kernel/KernelKit/UserProcessScheduler.h @@ -47,7 +47,7 @@ class USER_PROCESS final { HAL::StackFramePtr StackFrame{nullptr}; AffinityKind Affinity{AffinityKind::kStandard}; ProcessStatusKind Status{ProcessStatusKind::kKilled}; - UInt8* StackReserve{nullptr}; + UInt8 StackReserve[kSchedMaxStackSz]; PROCESS_IMAGE Image{}; SizeT StackSize{kSchedMaxStackSz}; IDylibObject* DylibDelegate{nullptr}; @@ -92,6 +92,8 @@ class USER_PROCESS final { /***********************************************************************************/ Void Crash(); + Bool SpawnDylib(); + /***********************************************************************************/ ///! @brief Exits the app. /***********************************************************************************/ @@ -219,8 +221,7 @@ class UserProcessScheduler final : public ISchedulable { class UserProcessHelper final { public: - STATIC Bool Switch(VoidPtr image_ptr, UInt8* stack_ptr, HAL::StackFramePtr frame_ptr, - PID new_pid); + STATIC Bool Switch(HAL::StackFramePtr frame_ptr, PID new_pid); STATIC Bool CanBeScheduled(const USER_PROCESS& process); STATIC ErrorOr TheCurrentPID(); STATIC SizeT StartScheduling(); -- cgit v1.2.3