arm-v6/7/8m: sigaction should use running_task

Nested irq possible cause readytorun not match with regs

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-12-04 18:20:20 +08:00 committed by Xiang Xiao
parent 909bf2dbb4
commit 55822753be
3 changed files with 6 additions and 9 deletions

View file

@ -80,14 +80,13 @@
void up_schedule_sigaction(struct tcb_s *tcb)
{
sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, this_task(),
this_task()->xcp.regs);
FAR struct tcb_s *rtcb = running_task();
/* First, handle some special cases when the signal is
* being delivered to the currently executing task.
*/
if (tcb == this_task() && !up_interrupt_context())
if (tcb == rtcb && !up_interrupt_context())
{
/* In this case just deliver the signal now.
* REVISIT: Signal handle will run in a critical section!

View file

@ -81,14 +81,13 @@
void up_schedule_sigaction(struct tcb_s *tcb)
{
sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, this_task(),
this_task()->xcp.regs);
FAR struct tcb_s *rtcb = running_task();
/* First, handle some special cases when the signal is
* being delivered to the currently executing task.
*/
if (tcb == this_task() && !up_interrupt_context())
if (tcb == rtcb && !up_interrupt_context())
{
/* In this case just deliver the signal now.
* REVISIT: Signal handle will run in a critical section!

View file

@ -81,14 +81,13 @@
void up_schedule_sigaction(struct tcb_s *tcb)
{
sinfo("tcb=%p, rtcb=%p current_regs=%p\n", tcb, this_task(),
this_task()->xcp.regs);
FAR struct tcb_s *rtcb = running_task();
/* First, handle some special cases when the signal is
* being delivered to the currently executing task.
*/
if (tcb == this_task() && !up_interrupt_context())
if (tcb == rtcb && !up_interrupt_context())
{
/* In this case just deliver the signal now.
* REVISIT: Signal handle will run in a critical section!