4.6.31 rw_read_held

int rw_read_held(krwlock_t *rwlock)

rw_read_held returns non-zero if the specified reader-writer lock rwlock is currently held by a reader. If the lock is held only by writers or is not held at all, rw_read_held returns zero.