4.2.32 rw_write_held

int rw_write_held(krwlock_t *rwlock)

The rw_write_held function returns non-zero
if the specified reader-writer lock
(rwlock) is currently held by a
writer. If the lock is held only by readers or is not held at
all, rw_write_held returns zero.