search for: rw_owner

Displaying 1 result from an estimated 1 matches for "rw_owner".

Did you mean: pg_owner
2006 Jun 02
5
Read-write locks in libzpool
Hi, I think I found a bug in the rw_enter() implementation (emulation?) in libzpool, file /usr/src/lib/libzpool/common/kernel.c: void rw_enter(krwlock_t *rwlp, krw_t rw) { ASSERT(!RW_LOCK_HELD(rwlp)); ASSERT(rwlp->rw_owner != (void *)-1UL); ASSERT(rwlp->rw_owner != curthread); if (rw == RW_READER) (void) rw_rdlock(&rwlp->rw_lock); else (void) rw_wrlock(&rwlp->rw_lock); rwlp->rw_owner = curthread; } Doesn''t RW_LOCK_HELD() check if there''s a reader or a writer locked? If...