diff --git a/arch/arm/src/common/up_exit.c b/arch/arm/src/common/up_exit.c index 0e7be57832..9fe3fdaa2f 100644 --- a/arch/arm/src/common/up_exit.c +++ b/arch/arm/src/common/up_exit.c @@ -187,5 +187,9 @@ void _exit(int status) /* Then switch contexts */ +#ifdef CONFIG_ARCH_ARMV8M + arm_fullcontextrestore(tcb->xcp.regs); +#else up_fullcontextrestore(tcb->xcp.regs); +#endif }