X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fthread.c;h=61351b569add5a112f66f2210f9bb70989ced7c6;hb=3625c2e6aba3b282f91282492c4b3fba324816c1;hp=52f0f8d4fc73d8f65818163aaca9c7229cf8e97e;hpb=8b509aacccb9bb7b75f08aa3889d53770027a497;p=pintos-anon diff --git a/src/threads/thread.c b/src/threads/thread.c index 52f0f8d..61351b5 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -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