mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
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:
@@ -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!
|
||||||
|
|||||||
@@ -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!
|
||||||
|
|||||||
@@ -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!
|
||||||
|
|||||||
Reference in New Issue
Block a user