diff options
| author | Amlal EL Mahrouss. <113760121+amlel-el-mahrouss@users.noreply.github.com> | 2024-11-26 15:41:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-26 15:41:56 +0100 |
| commit | f05ac8c656f3dccd79e7b3a276c86f08be2bb9f7 (patch) | |
| tree | 8d9307c53d6ba28d321f3469cf933bf076d92d23 /dev/ZKAKit/src/UserProcessScheduler.cc | |
| parent | f71dee9aae7f590caf77d226e694b8224c9c1e22 (diff) | |
| parent | 476e896ba9169b4b71c1e80d3e44dd006934b3e5 (diff) | |
Merge pull request #4 from ELMH-Group/unstable
Unstable
Diffstat (limited to 'dev/ZKAKit/src/UserProcessScheduler.cc')
| -rw-r--r-- | dev/ZKAKit/src/UserProcessScheduler.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/dev/ZKAKit/src/UserProcessScheduler.cc b/dev/ZKAKit/src/UserProcessScheduler.cc index 313f1532..9a4918af 100644 --- a/dev/ZKAKit/src/UserProcessScheduler.cc +++ b/dev/ZKAKit/src/UserProcessScheduler.cc @@ -229,18 +229,19 @@ namespace Kernel /***********************************************************************************/ /** - @brief Process exit method. + @brief Exit process method. + @param exit_code The process's exit code. */ /***********************************************************************************/ - void UserProcess::Exit(const Int32& exit_code) + Void UserProcess::Exit(const Int32& exit_code) { - this->Status = exit_code > 0 ? ProcessStatusKind::kKilled : ProcessStatusKind::KFinishing; + this->Status = exit_code > 0 ? ProcessStatusKind::kKilled : ProcessStatusKind::kFrozen; this->fLastExitCode = exit_code; kLastExitCode = exit_code; - auto memory_list = this->MemoryHeap; + auto memory_heap_list = this->MemoryHeap; #ifdef __ZKA_AMD64__ auto pd = hal_read_cr3(); @@ -248,23 +249,23 @@ namespace Kernel #endif // Deleting memory lists. Make sure to free all of them. - while (memory_list) + while (memory_heap_list) { - if (memory_list->MemoryEntry) + if (memory_heap_list->MemoryEntry) { - MUST_PASS(mm_delete_heap(memory_list->MemoryEntry)); + MUST_PASS(mm_delete_heap(memory_heap_list->MemoryEntry)); } #ifdef __ZKA_AMD64__ hal_write_cr3(pd); #endif - auto next = memory_list->MemoryNext; + auto next = memory_heap_list->MemoryNext; - mm_delete_heap(memory_list); - memory_list = nullptr; + mm_delete_heap(memory_heap_list); - memory_list = next; + memory_heap_list = nullptr; + memory_heap_list = next; } //! Free the memory's page directory. |
