From 204b629b838dd2b1481887ccf8abcd58e605e8b9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 29 Aug 2004 19:18:10 +0000 Subject: [PATCH] Make thread_root() enable interrupts, otherwise kernel threads will run with interrupts off, which is really bad... --- src/threads/thread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.30.2