mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
make swapper api generic for re-entrant kernel calls (alloc element)
This commit is contained in:
parent
0e135b0e4c
commit
62eb233db1
1 changed files with 11 additions and 6 deletions
|
|
@ -404,13 +404,18 @@ impl MemoryManager {
|
|||
}
|
||||
}
|
||||
}
|
||||
if !crate::swap::Swap::with_mut(|s| s.hard_oom_inline()) {
|
||||
break;
|
||||
}
|
||||
crate::swap::Swap::with_mut(|s| {
|
||||
s.swap_reentrant_syscall(xous_kernel::SysCall::SwapOp(
|
||||
crate::swap::SwapAbi::HardOom as usize,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
))
|
||||
});
|
||||
}
|
||||
// the call above actually diverges -- the final path will actually depend on how much memory
|
||||
// could be freed by the swapper.
|
||||
Err(xous_kernel::Error::OutOfMemory)
|
||||
}
|
||||
|
||||
/// Find a virtual address in the current process that is big enough
|
||||
|
|
|
|||
Loading…
Reference in a new issue