xous: make terminate_process divergent

This allows for terminating a process when something goes wrong.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-04-05 18:19:33 +08:00
parent 4830f3eb2c
commit 03bed02393

View file

@ -1318,8 +1318,9 @@ pub fn send_message(connection: CID, message: Message) -> core::result::Result<R
} }
} }
pub fn terminate_process() { pub fn terminate_process() -> ! {
rsyscall(SysCall::TerminateProcess).expect("terminate_process returned an error"); rsyscall(SysCall::TerminateProcess).expect("terminate_process returned an error");
panic!("process didn't terminate");
} }
/// Return execution to the kernel. This function may return at any time, /// Return execution to the kernel. This function may return at any time,