mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
The POSIX layer only exported init, destroy, rdlock, wrlock and unlock. pthread_rwlock_tryrdlock, pthread_rwlock_trywrlock, pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock now wrap the existing scePthreadRwlock functions and accept the static initializer. The timed variants take an absolute CLOCK_REALTIME deadline. Like FreeBSD libthr they try the lock first and only validate abstime when the lock is not free. A null abstime throws, as pthread_mutex_timedlock does. scePthreadRwlockTryrdlock and scePthreadRwlockTrywrlock return EBUSY when the caller already holds the write lock instead of calling into std::shared_timed_mutex, where that is undefined behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>