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