diff --git a/arch/x86_64/src/intel64/intel64_cpupause.c b/arch/x86_64/src/intel64/intel64_cpupause.c index 7f6891d24c..9d95e8f08d 100644 --- a/arch/x86_64/src/intel64/intel64_cpupause.c +++ b/arch/x86_64/src/intel64/intel64_cpupause.c @@ -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; }