diff --git a/src/threads/thread.c b/src/threads/thread.c index d488677..7102ad2 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -264,7 +264,7 @@ thread_create (const char *name, int priority, /* Yield if the newly created thread has higher priority than the current thread. */ - if (t->priority > thread_current ()->priority) + if (t->priority > thread_get_priority ()) thread_yield (); return tid;