Cleanup.
[pintos-anon] / src / threads / thread.c
index 336be0392804907a9c560d87c1256f500991a8bc..560423b7de39dd9f3c6d92efda1b4e23ce811b72 100644 (file)
@@ -13,7 +13,6 @@
 #include "threads/synch.h"
 #ifdef USERPROG
 #include "userprog/process.h"
-#include "userprog/gdt.h"
 #endif
 
 /* Random value for struct thread's `magic' member.
@@ -70,15 +69,13 @@ thread_init (void)
   ASSERT (intr_get_level () == INTR_OFF);
 
   lock_init (&tid_lock, "tid");
+  list_init (&ready_list);
 
   /* Set up a thread structure for the running thread. */
   initial_thread = running_thread ();
   init_thread (initial_thread, "main", PRI_DEFAULT);
   initial_thread->status = THREAD_RUNNING;
   initial_thread->tid = allocate_tid ();
-
-  /* Initialize run queue. */
-  list_init (&ready_list);
 }
 
 /* Starts preemptive thread scheduling by enabling interrupts.