From 33d5ed540ddfee564a0919e5c98f42260d70c183 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 18 May 2024 00:28:11 +0800 Subject: [PATCH] cleanup some warnings in other targets --- kernel/src/services.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/src/services.rs b/kernel/src/services.rs index bef122168..52c41881a 100644 --- a/kernel/src/services.rs +++ b/kernel/src/services.rs @@ -269,7 +269,7 @@ impl Process { } /// Reveal state for debugging outside the crate. - #[cfg(all(feature = "swap", baremetal))] + #[cfg(all(feature = "debug-swap-verbose", baremetal))] pub fn state(&self) -> ProcessState { self.state } } @@ -523,6 +523,7 @@ impl SystemServices { pub fn current_pid(&self) -> PID { arch::process::current_pid() } /// Must be called from the swapper's context. Resets the runnable states of the swapper. + #[cfg(feature = "swap")] pub fn finish_swap(&mut self) { let current_pid = self.current_pid(); let current = self.get_process_mut(current_pid).expect("couldn't get current PID"); @@ -535,6 +536,7 @@ impl SystemServices { }; } + #[cfg(feature = "swap")] pub fn swap_resume_to_userspace(&mut self, pid: PID, tid: TID) -> Result<(), xous_kernel::Error> { let process = self.get_process_mut(pid)?; #[cfg(feature = "gdb-stub")]