Refactor thread_create () to call thread_get_priority in order to retrieve priority
This commit is contained in:
@@ -264,7 +264,7 @@ thread_create (const char *name, int priority,
|
|||||||
|
|
||||||
/* Yield if the newly created thread has higher priority than the current
|
/* Yield if the newly created thread has higher priority than the current
|
||||||
thread. */
|
thread. */
|
||||||
if (t->priority > thread_current ()->priority)
|
if (t->priority > thread_get_priority ())
|
||||||
thread_yield ();
|
thread_yield ();
|
||||||
|
|
||||||
return tid;
|
return tid;
|
||||||
|
|||||||
Reference in New Issue
Block a user