x86_64: we should call x86_64_restorestate/x86_64_savestate
reason: In x86_64, g_current_regs is still used for context switching. This commit fixes the regression from https://github.com/apache/nuttx/pull/13616 Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
8153307da5
commit
0e87a475d3
1 changed files with 7 additions and 0 deletions
|
|
@ -286,9 +286,16 @@ int up_pause_handler(int irq, void *c, void *arg)
|
|||
|
||||
int up_pause_async_handler(int irq, void *c, void *arg)
|
||||
{
|
||||
struct tcb_s *tcb;
|
||||
int cpu = this_cpu();
|
||||
|
||||
tcb = current_task(cpu);
|
||||
nxsched_suspend_scheduler(tcb);
|
||||
x86_64_savestate(tcb->xcp.regs);
|
||||
nxsched_process_delivered(cpu);
|
||||
tcb = current_task(cpu);
|
||||
nxsched_resume_scheduler(tcb);
|
||||
x86_64_restorestate(tcb->xcp.regs);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue