Skip to content
Snippets Groups Projects
Commit 445b30a1 authored by zitongc2's avatar zitongc2
Browse files

Update pit.c

parent b628399d
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,19 @@ void pit_handler(){
send_eoi(0);
//todo
pcb_t* pcb = get_pcb(control.cur_pid);
asm volatile(
"movl %%esp, %0\n"
"movl %%ebp, %1\n"
"leal switch_addr, %2\n"
: "=r" (pcb->current_esp), "=r" (pcb->current_ebp), "=r" (pcb->current_eip)
:
: "memory"
);
scheduler();
asm volatile ("switch_addr:");
return;
return;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment