mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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) => {
|
RiscvException::InstructionPageFault(RETURN_FROM_SWAPPER, _offset) => {
|
||||||
// Cleanup after the swapper
|
// Cleanup after the swapper
|
||||||
let response =
|
let response = Swap::with_mut(|s|
|
||||||
Swap::with_mut(|s| s.exit_blocking_call()).unwrap_or_else(xous_kernel::Result::Error);
|
// 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.
|
// Resume like we're returning from a syscall.
|
||||||
enable_all_irqs();
|
enable_all_irqs();
|
||||||
ArchProcess::with_current_mut(|p| {
|
ArchProcess::with_current_mut(|p| {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue