From 979ce7a589873eb99840cf5f0902ce0d3081047d Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 17 May 2025 16:26:51 +0800 Subject: [PATCH] add missing args to flush syscall --- kernel/src/swap.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/src/swap.rs b/kernel/src/swap.rs index 371912a7d..d99e1e82b 100644 --- a/kernel/src/swap.rs +++ b/kernel/src/swap.rs @@ -685,10 +685,13 @@ impl Swap { } /// This passes on to the userspace handler a page that needs to be written to SPI flash. - pub fn flush_page_syscall(&mut self, target_vaddr_in_pid: usize, paddr: usize) -> ! { - let target_pid = crate::arch::process::current_pid(); - let target_tid = crate::arch::process::current_tid(); - + pub fn flush_page_syscall( + &mut self, + target_vaddr_in_pid: usize, + paddr: usize, + target_pid: PID, + target_tid: usize, + ) -> ! { let block_vaddr_in_swap = crate::arch::mem::map_page_to_swapper(paddr).expect("couldn't map target page to swapper"); // we are now in the swapper's memory space