arch/arm/src/armv7-m/up_schedulesigaction.c: Correct hardfault that can occur when killing a task via Ctrl-C in PROTECTED mode.

This commit is contained in:
Valmantas Palikša 2019-12-02 08:15:41 -06:00 committed by Gregory Nutt
parent 736a0da8ec
commit cc0a0e7aa9

View File

@ -168,6 +168,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
CURRENT_REGS[REG_XPSR] = ARMV7M_XPSR_T;
#ifdef CONFIG_BUILD_PROTECTED
CURRENT_REGS[REG_LR] = EXC_RETURN_PRIVTHR;
CURRENT_REGS[REG_EXC_RETURN] = EXC_RETURN_PRIVTHR;
#endif
/* And make sure that the saved context in the TCB is the same
* as the interrupt return context.