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);
|
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()
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
puts("usertests starting\n");
|
puts("usertests starting\n");
|
||||||
pipe1();
|
//pipe1();
|
||||||
//preempt();
|
preempt();
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue