Skip to content

Commit

Permalink
fix some arch miss update g_running_tasks
Browse files Browse the repository at this point in the history
Signed-off-by: hujun5 <hujun5@xiaomi.com>
  • Loading branch information
hujun260 authored and xiaoxiang781216 committed Nov 15, 2024
1 parent 5cc5dec commit 5300d77
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/avr/src/avr/avr_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Switch context to the context of the task at the head of the
* ready to run list.
*/
Expand Down
4 changes: 4 additions & 0 deletions arch/avr/src/avr32/avr_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

avr_switchcontext(rtcb->xcp.regs, tcb->xcp.regs);
Expand Down
4 changes: 4 additions & 0 deletions arch/hc/src/common/hc_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

hc_fullcontextrestore(tcb->xcp.regs);
Expand Down
4 changes: 4 additions & 0 deletions arch/or1k/src/common/or1k_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

or1k_fullcontextrestore(tcb->xcp.regs);
Expand Down
4 changes: 4 additions & 0 deletions arch/renesas/src/common/renesas_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

renesas_fullcontextrestore(tcb->xcp.regs);
Expand Down
4 changes: 4 additions & 0 deletions arch/sim/src/sim/sim_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)

restore_critical_section(tcb, this_cpu());

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

sim_fullcontextrestore(tcb->xcp.regs);
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/src/common/x86_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

x86_fullcontextrestore(tcb->xcp.regs);
Expand Down
4 changes: 4 additions & 0 deletions arch/z16/src/common/z16_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ void up_switch_context(FAR struct tcb_s *tcb, FAR struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

RESTORE_USERCONTEXT(tcb);
Expand Down
4 changes: 4 additions & 0 deletions arch/z80/src/common/z80_switchcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ void up_switch_context(FAR struct tcb_s *tcb, FAR struct tcb_s *rtcb)

nxsched_resume_scheduler(tcb);

/* Record the new "running" task */

g_running_tasks[this_cpu()] = tcb;

/* Then switch contexts */

RESTORE_USERCONTEXT(tcb);
Expand Down

0 comments on commit 5300d77

Please sign in to comment.