fix: passing intr_ctx to soft_iret corrupts the stack of next proccess when performin...
[lunaix-os.git] / lunaix-os / kernel / sched.c
index e7bcd9a6d3fc5fb3a7e8b5577e9592f4ab8f8a1c..8c43b149d3eb761ec094269a765ba9808ca775ea 100644 (file)
@@ -58,9 +58,9 @@ run(struct proc_info* proc)
 
     apic_done_servicing();
 
-    asm volatile("pushl %0\n"
+    asm volatile("movl %0, %%eax\n"
                  "jmp soft_iret\n" ::"r"(&__current->intr_ctx)
-                 : "memory");
+                 : "eax", "memory");
 }
 
 void