Update donate priority to add an assertion that intrrupts are disabled, w/ T
This commit is contained in:
@@ -196,9 +196,12 @@ lock_init (struct lock *lock)
|
||||
|
||||
/* Current thread donates its priority to donee, iteratively
|
||||
propagating the donation in the case of chains in the wait-for graph.
|
||||
Also keeps track of the donation by updating the donors list. */
|
||||
Also keeps track of the donation by updating the donors list. Expects
|
||||
interrupts to be disabled. */
|
||||
static void
|
||||
donate_priority (struct thread *donee) {
|
||||
ASSERT (intr_get_level () == INTR_OFF);
|
||||
|
||||
struct thread *donor = thread_current ();
|
||||
list_push_back (&donee->donors_list, &donor->donor_elem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user