From: rtm Date: Tue, 11 Jul 2006 18:45:27 +0000 (+0000) Subject: give each cpu its own clock, so that preemption works on cpu 1 X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=b41b38d0da0854f3fa92967b70180ea1156154d4;p=cs3210-lab1.git give each cpu its own clock, so that preemption works on cpu 1 --- diff --git a/main.c b/main.c index ce29af3..c6051ed 100644 --- a/main.c +++ b/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; diff --git a/usertests.c b/usertests.c index 2f688ca..fa1b210 100644 --- a/usertests.c +++ b/usertests.c @@ -93,8 +93,8 @@ preempt() main() { puts("usertests starting\n"); - pipe1(); - //preempt(); + //pipe1(); + preempt(); while(1) ;