Skip to content
Snippets Groups Projects
Commit b41b38d0 authored by rtm's avatar rtm
Browse files

give each cpu its own clock, so that preemption works on cpu 1

parent b548df15
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,8 @@ main() ...@@ -28,6 +28,8 @@ main()
acquire_spinlock(&kernel_lock); acquire_spinlock(&kernel_lock);
idtinit(); // CPU's idt idtinit(); // CPU's idt
lapic_init(cpu()); lapic_init(cpu());
lapic_timerinit();
lapic_enableintr();
scheduler(); scheduler();
} }
acpu = 1; acpu = 1;
......
...@@ -93,8 +93,8 @@ preempt() ...@@ -93,8 +93,8 @@ preempt()
main() main()
{ {
puts("usertests starting\n"); puts("usertests starting\n");
pipe1(); //pipe1();
//preempt(); preempt();
while(1) while(1)
; ;
......
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