From 03515934dfef166955d82406c6fd023eb377b872 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 16 May 2024 03:51:38 +0800 Subject: [PATCH] clarify function of the thread context area --- loader/src/minielf.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/loader/src/minielf.rs b/loader/src/minielf.rs index b095e1592..29b7f9cfb 100644 --- a/loader/src/minielf.rs +++ b/loader/src/minielf.rs @@ -161,12 +161,12 @@ impl MiniElf { // Turn the satp address into a pointer println!(" Pagetable @ {:08x}", _tt_address); - // Allocate thread 1 for this process + // Allocate thread contexts let thread_address = allocator.alloc() as usize; - println!(" Thread 1 @ {:08x}", thread_address); + println!(" Thread contexts @ {:08x}", thread_address); allocator.map_page(tt, thread_address, CONTEXT_OFFSET, FLG_R | FLG_W | FLG_VALID, pid); #[cfg(feature = "swap")] - allocator.mark_as_wired(thread_address); // don't allow the process descriptor to be swapped in any process + allocator.mark_as_wired(thread_address); // don't allow the thread contexts to be swapped in any process // Allocate stack pages. println!(" Stack");