Merge 'task1/priority-donation' into 'master' #14
@@ -223,6 +223,10 @@ thread_create (const char *name, int priority,
|
||||
/* Add to run queue. */
|
||||
thread_unblock (t);
|
||||
|
||||
/* Yield if the new thread has a higher priority than the current thread. */
|
||||
if (priority > thread_get_priority ())
|
||||
thread_yield ();
|
||||
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user