Lines Matching defs:rwstate
2240 * Release one writer or one or more readers. Compute the rwstate word to
2242 * rwstate value back to userland before we wake any of the new lock holders.
2259 uint32_t rwstate = 0;
2271 rwstate |= URW_WRITE_LOCKED;
2280 rwstate |= URW_HAS_WAITERS;
2287 rwstate++;
2297 rwstate |= URW_HAS_WAITERS;
2306 /* Copy the new rwstate back to userland. */
2307 suword32_noerr(&rw->rwlock_readers, rwstate);
2357 uint32_t rwstate;
2472 * rwstate's URW_HAS_WAITERS bit may indicate false positives.
2479 fuword32_noerr(&rw->rwlock_readers, &rwstate);
2485 rwstate |= URW_HAS_WAITERS;
2490 if (!(rwstate & URW_WRITE_LOCKED)) {
2494 * Hmmm, rwstate indicates waiters but there are
2503 rwstate++;
2505 } else if ((rwstate & URW_READERS_MASK) == 0) {
2506 rwstate |= URW_WRITE_LOCKED;
2528 rwstate++;
2538 suword32_noerr(&rw->rwlock_readers, rwstate);
2573 suword32_noerr(&rw->rwlock_readers, rwstate);
2720 uint32_t rwstate;
2769 * to which we also delegate the task of copying the new rwstate
2772 fuword32_noerr(&rw->rwlock_readers, &rwstate);
2773 if (rwstate & URW_WRITE_LOCKED)
2775 else if ((rwstate & URW_READERS_MASK) > 0) {
2776 rwstate--;
2777 if ((rwstate & URW_READERS_MASK) == 0)
2780 suword32_noerr(&rw->rwlock_readers, rwstate);