mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
implement RegisterSwapper syscall
This commit is contained in:
parent
9fb1acb705
commit
b0665c3412
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue