From 030ced4e1f188f52f6579532c860f5c60cfec826 Mon Sep 17 00:00:00 2001 From: manuel Date: Fri, 11 May 2012 03:11:51 +0200 Subject: slightly better description --- threads/synch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'threads') diff --git a/threads/synch.c b/threads/synch.c index 364b769..db204f5 100644 --- a/threads/synch.c +++ b/threads/synch.c @@ -233,8 +233,9 @@ lock_acquire (struct lock *lock) if (lock->holder != NULL) cur->blocked_lock = lock; - /* nested priority donation: we loop backwards: lock -> holder -> blocked_lock - and donate our priority */ + /* nested priority donation: + we need to loop backwards: lock -> holder -> blocked_lock + our first iteration is the generic (not nested) priority donation case */ blocked_lock = lock; while (blocked_lock != NULL && blocked_lock->holder != NULL) { -- cgit v1.2.3