give each cpu its own clock, so that preemption works on cpu 1
This commit is contained in:
parent
b548df152b
commit
b41b38d0da
2 changed files with 4 additions and 2 deletions
2
main.c
2
main.c
|
@ -28,6 +28,8 @@ main()
|
|||
acquire_spinlock(&kernel_lock);
|
||||
idtinit(); // CPU's idt
|
||||
lapic_init(cpu());
|
||||
lapic_timerinit();
|
||||
lapic_enableintr();
|
||||
scheduler();
|
||||
}
|
||||
acpu = 1;
|
||||
|
|
|
@ -93,8 +93,8 @@ preempt()
|
|||
main()
|
||||
{
|
||||
puts("usertests starting\n");
|
||||
pipe1();
|
||||
//preempt();
|
||||
//pipe1();
|
||||
preempt();
|
||||
|
||||
while(1)
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue