mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
xous: terminate process on panic
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
6b1dc7f853
commit
b497ad113e
2 changed files with 5 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ macro_rules! maybe_main {
|
|||
println!("PANIC!");
|
||||
println!("Details: {:?}", arg);
|
||||
xous::syscall::wait_event();
|
||||
xous::syscall::terminate_process();
|
||||
loop {}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1096,6 +1096,10 @@ pub fn send_message(connection: CID, message: Message) -> core::result::Result<R
|
|||
}
|
||||
}
|
||||
|
||||
pub fn terminate_process() {
|
||||
rsyscall(SysCall::TerminateProcess).expect("terminate_process returned an error");
|
||||
}
|
||||
|
||||
/// Return execution to the kernel. This function may return at any time,
|
||||
/// including immediately
|
||||
pub fn yield_slice() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue