mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
ensure compliance with unsafe conditions on exit_blocking_call()
This commit is contained in:
parent
b2cd829adb
commit
14364e09c6
1 changed files with 4 additions and 2 deletions
|
|
@ -310,8 +310,10 @@ pub extern "C" fn trap_handler(
|
|||
|
||||
RiscvException::InstructionPageFault(RETURN_FROM_SWAPPER, _offset) => {
|
||||
// Cleanup after the swapper
|
||||
let response =
|
||||
Swap::with_mut(|s| s.exit_blocking_call()).unwrap_or_else(xous_kernel::Result::Error);
|
||||
let response = Swap::with_mut(|s|
|
||||
// safety: this is safe because on return from swapper, we're in the swapper's memory space.
|
||||
unsafe { s.exit_blocking_call() })
|
||||
.unwrap_or_else(xous_kernel::Result::Error);
|
||||
// Resume like we're returning from a syscall.
|
||||
enable_all_irqs();
|
||||
ArchProcess::with_current_mut(|p| {
|
||||
|
|
|
|||
Loading…
Reference in a new issue