pub unsafe fn terminate(reason: SysexitReason) -> !Expand description
Ask a semihosting host to terminate execution.
Issues ARM semihosting’s SYS_EXIT (0x18) [aka,
angel_SWIreason_ReportException (0x18) on older cortex-m arches,
but they have the same semantics].
This may not actually halt execution. A debugger can tell semihosting
to resume the target. In that case, this will stick at the terminal loop.
§Safety
This nominally halts execution, thus the caller should have the authority to
halt execution. This should only be called on under semihosting (e.g. on
a QEMU board); on other targets the BKPT will escalate to a HardFault.