summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_rwlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_rwlock.c')
-rw-r--r--sys/kern/kern_rwlock.c7
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) {
OpenPOWER on IntegriCloud