mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
scePthreadJoin checked whether the thread was detached before whether it was the calling thread. So a detached thread joining itself got EINVAL instead of EDEADLK, and so did the main thread, which scePthreadSelf adopts as detached. FreeBSD's join checks the calling thread right after the null check and before it looks at the detach state. The self check now comes first; the null, detached and already-joined answers are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>