Add copyright notice to synch.h.
[pintos-anon] / src / threads / thread.c
index 52f0f8d4fc73d8f65818163aaca9c7229cf8e97e..61351b569add5a112f66f2210f9bb70989ced7c6 100644 (file)
@@ -182,7 +182,7 @@ thread_unblock (struct thread *t)
   old_level = intr_disable ();
   if (t->status == THREAD_BLOCKED) 
     {
-      list_push_back (&run_queue, &t->rq_elem);
+      list_push_back (&run_queue, &t->elem);
       t->status = THREAD_READY;
     }
   intr_set_level (old_level);
@@ -241,7 +241,7 @@ thread_yield (void)
   ASSERT (!intr_context ());
 
   old_level = intr_disable ();
-  list_push_back (&run_queue, &cur->rq_elem);
+  list_push_back (&run_queue, &cur->elem);
   cur->status = THREAD_READY;
   schedule ();
   intr_set_level (old_level);
@@ -364,7 +364,7 @@ next_thread_to_run (void)
   if (list_empty (&run_queue))
     return idle_thread;
   else
-    return list_entry (list_pop_front (&run_queue), struct thread, rq_elem);
+    return list_entry (list_pop_front (&run_queue), struct thread, elem);
 }
 
 /* Destroys T, which must be in the dying state and must not be