Refactor thread_create () to call thread_get_priority in order to retrieve priority #21
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user