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

This commit is contained in:
rtm 2006-07-11 18:45:27 +00:00
parent b548df152b
commit b41b38d0da
2 changed files with 4 additions and 2 deletions

2
main.c
View file

@ -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;

View file

@ -93,8 +93,8 @@ preempt()
main() main()
{ {
puts("usertests starting\n"); puts("usertests starting\n");
pipe1(); //pipe1();
//preempt(); preempt();
while(1) while(1)
; ;