Merge priority scheduling implementations by Themis and Saleh #8

Closed
td1223 wants to merge 13 commits from task1/priority-scheduling into task1/merged/priority-scheduling
4 changed files with 64 additions and 136 deletions
Showing only changes of commit e38e1400a2 - Show all commits

View File

@@ -270,8 +270,11 @@ cond_init (struct condition *cond)
semaphore is greater than the priority of the only thread in the second semaphore is greater than the priority of the only thread in the second
singleton semaphore. singleton semaphore.
If used for insertion, the third argument must be a pointer to struct Where this function is used for insertion in a singleton semaphore list, the
list_elem for the thread being inserted, otherwise must be NULL. */ third argument may specify a list_elem * to assume corresponds to the thread
waiting for the inserting semaphore. For correctness, ensure this thread
calls sema_down () for this semaphore before future list accesses. */
static bool static bool
singleton_sema_priority_greater (const struct list_elem *a, singleton_sema_priority_greater (const struct list_elem *a,
const struct list_elem *b, const struct list_elem *b,