Refactor thread_create () to call thread_get_priority in order to retrieve priority

This commit is contained in:
Themis Demetriades
2024-10-25 17:03:18 +01:00
parent 4c33653369
commit 4066354f8a

View File

@@ -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;