diff options
Diffstat (limited to 'usr/src/lib/libc/port/threads')
-rw-r--r-- | usr/src/lib/libc/port/threads/rwlock.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/src/lib/libc/port/threads/rwlock.c b/usr/src/lib/libc/port/threads/rwlock.c index 9654b7daaf..faff5da953 100644 --- a/usr/src/lib/libc/port/threads/rwlock.c +++ b/usr/src/lib/libc/port/threads/rwlock.c @@ -505,7 +505,6 @@ shared_rwlock_lock(rwlock_t *rwlp, timespec_t *tsp, int rd_wr) { volatile uint32_t *rwstate = (volatile uint32_t *)&rwlp->rwlock_readers; mutex_t *mp = &rwlp->mutex; - uint32_t readers; int try_flag; int error; @@ -536,8 +535,12 @@ shared_rwlock_lock(rwlock_t *rwlp, timespec_t *tsp, int rd_wr) } } atomic_or_32(rwstate, URW_HAS_WAITERS); + +#ifdef THREAD_DEBUG + uint32_t readers; readers = *rwstate; ASSERT_CONSISTENT_STATE(readers); +#endif /* * The calls to __lwp_rwlock_*() below will release the mutex, * so we need a dtrace probe here. The owner field of the |