diff --git a/src/threads/thread.c b/src/threads/thread.c index e93eeb8..4afbe68 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -291,7 +291,6 @@ thread_unblock (struct thread *t) old_level = intr_disable (); ASSERT (t->status == THREAD_BLOCKED); - /* Insert the thread back into the ready list in priority order. */ list_insert_ordered(&ready_list, &t->elem, priority_more, NULL); @@ -367,10 +366,8 @@ thread_yield (void) if (cur != idle_thread) { - /* Insert the thread back into the ready list in priority order. */ list_insert_ordered(&ready_list, &cur->elem, priority_more, NULL); - } cur->status = THREAD_READY; @@ -402,7 +399,6 @@ bool priority_more (const struct list_elem *a_, const struct list_elem *b_, void *aux UNUSED) { - struct thread *a = list_entry (a_, struct thread, elem); struct thread *b = list_entry (b_, struct thread, elem);