2 Commits
Author SHA1 Message Date
milescovielloandClaude Opus 5.5 c7849f8495 test(libkernel): check the timed locks against the holder's release, not elapsed time
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>
2026-10-17 10:07:17 +00:00
milescovielloandClaude Opus 5.5 676ee71c34 fix(libkernel): treat a null deadline as an untimed lock in the timed pthread locks
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>
2026-10-17 06:46:25 +00:00