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
f5a449487c
commit
fbed4ece2c
@ -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)
|
int up_pause_async_handler(int irq, void *c, void *arg)
|
||||||
{
|
{
|
||||||
|
struct tcb_s *tcb;
|
||||||
int cpu = this_cpu();
|
int cpu = this_cpu();
|
||||||
|
|
||||||
|
tcb = current_task(cpu);
|
||||||
|
nxsched_suspend_scheduler(tcb);
|
||||||
|
x86_64_savestate(tcb->xcp.regs);
|
||||||
nxsched_process_delivered(cpu);
|
nxsched_process_delivered(cpu);
|
||||||
|
tcb = current_task(cpu);
|
||||||
|
nxsched_resume_scheduler(tcb);
|
||||||
|
x86_64_restorestate(tcb->xcp.regs);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user