fix some arch miss update g_running_tasks

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2024-11-01 18:16:51 +08:00 committed by Xiang Xiao
parent 5cc5decd64
commit 5300d77398
9 changed files with 36 additions and 0 deletions

View file

@ -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.
*/

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);