diff --git a/kernel/src/syscall.rs b/kernel/src/syscall.rs index d4791cdcf..c5a1a8fbe 100644 --- a/kernel/src/syscall.rs +++ b/kernel/src/syscall.rs @@ -11,6 +11,8 @@ use crate::irq::{interrupt_claim, interrupt_free}; use crate::mem::{MemoryManager, PAGE_SIZE}; use crate::server::{SenderID, WaitingMessage}; use crate::services::SystemServices; +#[cfg(feature = "swap")] +use crate::swap::Swap; /* Quoth Xobs: The idea behind SWITCHTO_CALLER was that you'd have a process act as a scheduler, @@ -1006,6 +1008,10 @@ pub fn handle_inner(pid: PID, tid: TID, in_irq: bool, call: SysCall) -> SysCallR Err(_) => Err(xous_kernel::Error::BadAddress), } } + #[cfg(feature = "swap")] + SysCall::RegisterSwapper(s0, s1, s2, s3) => { + Swap::with_mut(|swap| swap.register_handler(s0, s1, s2, s3)) + } /* https://github.com/betrusted-io/xous-core/issues/90 SysCall::SetExceptionHandler(pc, sp) => SystemServices::with_mut(|ss| { ss.set_exception_handler(pid, pc, sp)