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);
idtinit(); // CPU's idt
lapic_init(cpu());
lapic_timerinit();
lapic_enableintr();
scheduler();
}
acpu = 1;

View file

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