mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
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:
committed by
Gregory Nutt
parent
736a0da8ec
commit
cc0a0e7aa9
@@ -168,6 +168,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
CURRENT_REGS[REG_XPSR] = ARMV7M_XPSR_T;
|
CURRENT_REGS[REG_XPSR] = ARMV7M_XPSR_T;
|
||||||
#ifdef CONFIG_BUILD_PROTECTED
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
CURRENT_REGS[REG_LR] = EXC_RETURN_PRIVTHR;
|
CURRENT_REGS[REG_LR] = EXC_RETURN_PRIVTHR;
|
||||||
|
CURRENT_REGS[REG_EXC_RETURN] = EXC_RETURN_PRIVTHR;
|
||||||
#endif
|
#endif
|
||||||
/* And make sure that the saved context in the TCB is the same
|
/* And make sure that the saved context in the TCB is the same
|
||||||
* as the interrupt return context.
|
* as the interrupt return context.
|
||||||
|
|||||||
Reference in New Issue
Block a user