diff options
author | attilio <attilio@FreeBSD.org> | 2008-05-27 00:27:50 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-05-27 00:27:50 +0000 |
commit | e089ccfc1bac6ad112c94e38b11d7a9f0485df8b (patch) | |
tree | 9c61c0a00fba32432d19fb8d90fb38c18ed72d5f | |
parent | 37ab20f9345885fbf9de8dc4c7afae66a0e3869b (diff) | |
download | FreeBSD-src-e089ccfc1bac6ad112c94e38b11d7a9f0485df8b.zip FreeBSD-src-e089ccfc1bac6ad112c94e38b11d7a9f0485df8b.tar.gz |
Improve a comment which, in the actual CVS stock, doesn't completely
explain the logic of the code chunk.
-rw-r--r-- | sys/kern/kern_rwlock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index 6a0aab9..7b88417 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -651,8 +651,11 @@ _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line) } #endif /* - * If the lock was released while waiting for the turnstile - * chain lock retry. + * Check for the waiters flags about this rwlock. + * If the lock was released, without maintain any pending + * waiters queue, simply try to acquire it. + * If a pending waiters queue is present, claim the lock + * ownership and maintain the pending queue. */ x = v & (RW_LOCK_WAITERS | RW_LOCK_WRITE_SPINNER); if ((v & ~x) == RW_UNLOCKED) { |