The waiter took the lock only after the holder unlocked, but under load it
saw the holder's lock late and measured less than half the hold time.
The holder now sets a flag just before it unlocks and the waiter requires
it once its lock is taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock and
pthread_mutex_timedlock threw for a null abstime. FreeBSD's libthr
passes a null abstime on to the untimed kernel lock, so these calls
then wait like pthread_rwlock_rdlock, pthread_rwlock_wrlock and
pthread_mutex_lock.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>