Commit Graph
7 Commits
Author SHA1 Message Date
Oscar45397andClaude Opus 5.5 abcaf94d43 test(libkernel): check pthread_barrier_destroy is busy while a thread waits
GuestPthreadBarrier destroyed barriers only after every thread had
passed. DestroyWhileWaiting blocks one thread on a two-thread barrier,
then requires pthread_barrier_destroy to return EBUSY and leave the
barrier usable, as POSIX and FreeBSD's libthr do while waiters remain.
The second arrival releases both, destroy then succeeds, and waiting on
or destroying the cleared handle returns EINVAL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 22:04:41 +01:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
xXPBSXxandClaude Sonnet 5.5 669455d1f2 fix(libkernel): reject a pthread barrier count above INT_MAX like libthr
_pthread_barrier_init fails a count above INT_MAX with EINVAL.
pthread_barrier_init accepted any count above zero.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 15:56:03 +02:00
ionut27001andClaude Opus 5.5 db504f6b9c fix(libkernel): reject PTHREAD_PROCESS_SHARED in pshared setters as the PS5 does
On a PS5 (firmware 12.70), of the values 0, 1, 2 and -1,
pthread_spin_init, pthread_barrierattr_setpshared and
pthread_mutexattr_setpshared accept only PTHREAD_PROCESS_PRIVATE (0);
1, 2 and -1 return EINVAL and leave the attribute unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 00:49:58 +03:00
Claude 602a76fc26 fix(libkernel): let pthread_barrier_destroy wait for released waiters
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Ha6Tsy62AFUyp9a5Mf7vjA
2026-10-11 20:57:22 +00:00
ChadandClaude Opus 5.5 d4b01b72c0 feat(libkernel): accept PTHREAD_PROCESS_SHARED barrier attributes
The PS5 kernel follows FreeBSD 11, whose libthr accepts process-shared
barriers. Guest code runs in a single process, so a process-shared
barrier synchronises the same threads a private one does; the attribute
is stored and reported back by getpshared.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 20:11:20 -05:00
DotDebianandClaude Opus 5.5 b279848c12 feat(libkernel): implement the pthread_barrierattr functions
pthread_barrier_init threw for any non-null attributes object, and no
function could create one. Add pthread_barrierattr_init, _destroy,
_getpshared and _setpshared after FreeBSD libthr, and let
pthread_barrier_init take the object.

PTHREAD_PROCESS_SHARED still throws in pthread_barrierattr_setpshared:
FreeBSD 9.0 rejects it and 11.0 accepts it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 17:08:07 +02:00