Merge implementations of priority scheduling by Themis and Saleh #12

Closed
td1223 wants to merge 10 commits from task1/priority-scheduling into task1/merged/priority-scheduling
3 changed files with 23 additions and 3 deletions
Showing only changes of commit 3c1a26b668 - Show all commits

View File

@@ -358,6 +358,7 @@ thread_set_priority (int new_priority)
{ {
ASSERT (PRI_MIN <= new_priority && new_priority <= PRI_MAX); ASSERT (PRI_MIN <= new_priority && new_priority <= PRI_MAX);
thread_current ()->priority = new_priority; thread_current ()->priority = new_priority;
thread_yield ();
} }
/* Returns the current thread's priority. */ /* Returns the current thread's priority. */