Commit Graph
24 Commits
Author SHA1 Message Date
Kraken 8df45c965d Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	core/libs/tests/GuestLibcThreads.cpp
2026-10-25 23:41:36 +00:00
Dean 88f99678bf Merge pull request #10648 from edubox/feat/libc-pad-launch-attr
feat(libc): forward pthread attributes in _Pad::_Launch
2026-10-26 10:42:58 +13:00
Dean 74a55da254 Merge pull request #10688 from edubox/feat/libc-mtx-timedlock
feat(libc): implement _Mtx_timedlock
2026-10-26 09:21:46 +13:00
Eduardo Ruiz 1adc418e6e feat(libc): forward pthread attributes in _Pad::_Launch 2026-10-25 18:34:18 +01:00
Eduardo Ruiz b3c9d35ae2 feat(libc): implement _Mtx_timedlock 2026-10-25 02:21:31 +01:00
Rookie 0297073da2 fix(libc): return the calling thread from _Thrd_id as the console's libc.prx does 2026-10-25 01:45:47 +01:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
hypermistandClaude Opus 5.5 e813b210bc Merge remote-tracking branch 'upstream/main' into feat/libc-sce-v2-thread-sync
Kept both sides of GuestLibcThreads.cpp: main's ThreadHelpers test and this PR's VersionedSync test, both called from main().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 07:59:37 +13:00
Kraken 65920e6fdc test(libc): cover CRT exit and TLS cleanup lifecycle 2026-10-21 17:56:28 +01:00
hypermist 8e08acba70 Merge remote-tracking branch 'upstream/main' into feat/libc-sce-v2-thread-sync
# Conflicts:
#	core/libs/tests/GuestLibcThreads.cpp
2026-10-22 02:52:08 +13:00
akkadbakkad89 3e0feb4bef feat(libc): export _Thrd_yield 2026-10-21 19:07:15 +05:30
hypermistandClaude Opus 5.5 58c9254154 test(libc): drop the comment from the thread forward check
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 23:49:07 +13:00
hypermistandClaude Opus 5.5 02bf457027 test(libc): load libkernel before checking the registered thread forwards
On Windows a DLL is only loaded when the executable imports from it. The
thread test imported nothing from libkernel, so its load-time registration
never ran and _Tss_create threw. Comparing _Thrd_current with
scePthreadSelf imports libkernel and checks the forward.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 23:47:22 +13:00
hypermistandClaude Opus 5.5 ae4d607a54 fix(libc): drop the versioned _Throw_Cpp_error and pin dropped results
The console's std::__sce_v2::_Throw_Cpp_error raises a
std::__sce_v2::system_error, not the unversioned std::system_error this
forwarded to. It moves to the versioned exception change, which adds that
type.

Review on #8885: the versioned unlock, wait, signal and broadcast calls
return 0 whatever the kernel returns, as the console's do (each calls the
kernel and clears eax). The test now shows the kernel failing an unowned
unlock and wait while the wrappers report success.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 17:42:15 +13:00
hypermistandClaude Opus 5.5 a24473311c feat(libc): add the std::__sce_v2 mutex, condition and thread calls
The versioned Dinkumware entries operate on libkernel's own mutex,
condition and thread handles: _Mtx_init(_with_name), _Mtx_destroy,
_Mtx_lock, _Mtx_trylock, _Mtx_unlock, _Cnd_init(_with_name),
_Cnd_destroy, _Cnd_wait, _Cnd_signal, _Cnd_broadcast, _Thrd_detach,
_Thrd_join, _Thrd_yield, _Thrd_id and _Throw_Cpp_error. libkernel
registers the pthread calls with libc next to the C11 forwards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 17:25:01 +13:00
hypermistandClaude Opus 5.5 8bddc39245 feat(libc): forward the C11 thread and TSS calls to libkernel
_Call_once, _Tss_create, _Tss_delete, _Tss_get, _Tss_set, _Thrd_equal,
_Thrd_current and _Thrd_exit call scePthreadOnce, scePthreadKeyCreate,
scePthreadKeyDelete, scePthreadGetspecific, scePthreadSetspecific,
scePthreadEqual, scePthreadSelf and scePthreadExit and return their
results unchanged, as the console's libSceLibcInternal does.
_Mtx_current_owns returns 1 there. libkernel registers the calls with
libc at load, next to the pthread_create registration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 16:31:00 +13:00
cadenasynysterandClaude Sonnet 5.5 a8b6d1c411 feat(libc): implement _Thrd_detach
Animal Well (PPSA22520) imports _Thrd_detach (L7f7zYwBvZA) from libc.prx and nothing exports it, so the Windows loader stops at startup. Register libkernel's pthread_detach with libc like pthread_create and pthread_join, and return _Thrd_error (4) when it fails.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

Claude-Session: https://claude.ai/code/session_01GtXavMkgCTCdmRpweviHcQ
2026-10-20 21:31:16 +02:00
hamb3r 3845df2f1e test(libc): cover Dinkumware _Pad and _Thrd_join in guest_libc_threads 2026-10-20 03:22:07 +03:00
hamb3r 8652dbe35b feat(libc): add missing Unity IL2CPP runtime imports and Dinkumware helpers
Add missing libc.prx symbols required by Unity IL2CPP runtime:
- Implement _Dtest double classification in Math.cpp
- Implement _Inf double constant in Math.cpp
- Implement sceLibcBacktraceGetBufferSize and sceLibcBacktraceSelf in Backtrace.cpp
- Implement _Cnd_signal in Threads.cpp
- Implement _ZNSt8ios_base7_AddstdEPS_ in RuntimeSupport.cpp
- Implement __pointer_type_info and __function_type_info vtables in TypeInfo.cpp
- Remove duplicate stubs from libSceAmpr/Export.cpp
- Add unit tests in GuestMath.cpp and GuestLibcThreads.cpp
- Document unverified behaviors in docs/dev/debt/libc.md
2026-10-13 19:01:30 +03:00
MarcZX100 b603d19bc4 fix(libc): match console mutex failure behavior 2026-10-10 22:47:34 +00:00
MarcZX100 f4e393a4e4 fix(libc): clear destroyed thread handles 2026-10-10 22:46:48 +00:00
MarcZX100 583b3de28f fix(libc): return thread errors for invalid operations 2026-10-10 22:46:48 +00:00
MarcZX100 697e3bf797 fix(libc): match console Dinkumware handle ABI 2026-10-10 22:46:48 +00:00
DavidandClaude Fable 5.1 9277d06705 feat(libc): implement the Dinkumware mutex and condition exports
Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-10 22:46:48 +00:00