mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +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()) {
|
crate::swap::Swap::with_mut(|s| {
|
||||||
break;
|
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
|
/// Find a virtual address in the current process that is big enough
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue