Make thread_root() enable interrupts, otherwise kernel threads will
[pintos-anon] / src / threads / thread.c
index 5e8a32911bfadb80ebf79e30e294d4222d425edb..636caac22e0733a7df85d8c1861a3eb4b9a1a0ca 100644 (file)
@@ -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