xtensa: Fix up_schedule_sigaction

This fixes various crashes in ostest.
This commit is contained in:
YAMAMOTO Takashi 2020-02-28 18:19:11 +09:00 committed by Gregory Nutt
parent 119a38ce10
commit 09d659d275

View File

@ -181,8 +181,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
*/
tcb->xcp.sigdeliver = sigdeliver;
tcb->xcp.saved_pc = CURRENT_REGS[REG_PC];
tcb->xcp.saved_ps = CURRENT_REGS[REG_PS];
tcb->xcp.saved_pc = tcb->xcp.regs[REG_PC];
tcb->xcp.saved_ps = tcb->xcp.regs[REG_PS];
/* Then set up to vector to the trampoline with interrupts
* disabled
@ -362,8 +362,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
*/
tcb->xcp.sigdeliver = sigdeliver;
tcb->xcp.saved_pc = CURRENT_REGS[REG_PC];
tcb->xcp.saved_ps = CURRENT_REGS[REG_PS];
tcb->xcp.saved_pc = tcb->xcp.regs[REG_PC];
tcb->xcp.saved_ps = tcb->xcp.regs[REG_PS];
/* Increment the IRQ lock count so that when the task is restarted,
* it will hold the IRQ spinlock.