From: Ben Pfaff Date: Sun, 29 Aug 2004 19:18:10 +0000 (+0000) Subject: Make thread_root() enable interrupts, otherwise kernel threads will X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=204b629b838dd2b1481887ccf8abcd58e605e8b9;p=pintos-anon Make thread_root() enable interrupts, otherwise kernel threads will run with interrupts off, which is really bad... --- diff --git a/src/threads/thread.c b/src/threads/thread.c index 5e8a329..636caac 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -30,7 +30,8 @@ static void thread_root (void (*function) (void *aux), void *aux) { ASSERT (function != NULL); - + + intr_enable (); function (aux); thread_exit (); } @@ -247,6 +248,7 @@ thread_start (struct thread *t) list_remove (&t->rq_elem); t->status = THREAD_RUNNING; switch_threads (NULL, t); + NOT_REACHED (); } void