From f5f62b145d472a2a2c388c385be9d1c4e5b5d84c Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 13 May 2025 08:46:49 +0200 Subject: feat(kernel): see below for the commit's details. what? - UserProcessScheduler and CoreProcessScheduler have been extended for FILE_TREE and also HEAP_TREE structures. - DDK device's API will use dk_ calls instead of sk_ calls. - SIGTRAP and Interrupt handlers have been fixed to handle when no process is being run, and the kernel is instead raising the interrupt. - Add file for HeFS formating in DiskImage.fwrk - Replace generic handler with breakpoint handler in int 3. why? - These changes are bug fixes and improvements. Signed-off-by: Amlal El Mahrouss --- dev/kernel/KernelKit/UserProcessScheduler.h | 30 +++++------------------------ 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'dev/kernel/KernelKit/UserProcessScheduler.h') diff --git a/dev/kernel/KernelKit/UserProcessScheduler.h b/dev/kernel/KernelKit/UserProcessScheduler.h index 42855e11..f04f4a0a 100644 --- a/dev/kernel/KernelKit/UserProcessScheduler.h +++ b/dev/kernel/KernelKit/UserProcessScheduler.h @@ -55,37 +55,16 @@ class USER_PROCESS final { SizeT MemoryLimit{kSchedMaxMemoryLimit}; SizeT UsedMemory{0UL}; - /// @brief Allocation tracker structure. - struct USER_HEAP_TREE final { - VoidPtr MemoryEntry{nullptr}; - SizeT MemoryEntrySize{0UL}; - SizeT MemoryEntryPad{0UL}; - - enum { - kInvalidMemory = 0, - kRedMemory = 100, - kBlackMemory = 101, - kCountMemory = 2, - }; - - Int32 MemoryColor{kBlackMemory}; - - struct USER_HEAP_TREE* MemoryParent{nullptr}; - struct USER_HEAP_TREE* MemoryChild{nullptr}; - - struct USER_HEAP_TREE* MemoryPrev{nullptr}; - struct USER_HEAP_TREE* MemoryNext{nullptr}; - }; - struct USER_PROCESS_SIGNAL final { UIntPtr SignalArg; ProcessStatusKind Status; UIntPtr SignalID; }; - USER_PROCESS_SIGNAL Signal; - USER_HEAP_TREE* HeapTree{nullptr}; - UserProcessTeam* ParentTeam; + USER_PROCESS_SIGNAL Signal; + PROCESS_FILE_TREE* FileTree{nullptr}; + PROCESS_HEAP_TREE* HeapTree{nullptr}; + UserProcessTeam* ParentTeam; VoidPtr VMRegister{0UL}; @@ -205,6 +184,7 @@ class UserProcessScheduler final : public ISchedulable { NE_COPY_DELETE(UserProcessScheduler) NE_MOVE_DELETE(UserProcessScheduler) + public: operator bool(); bool operator!(); -- cgit v1.2.3