logb and logbf returned the host's logb, which sets ERANGE for a zero
argument on Windows and returns signalling NaNs unquieted. The titles'
copies are FreeBSD msun's s_logb.c and s_logbf.c, which set no errno and
quiet a NaN through x * x; both functions now compute that algorithm.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
scePthreadCondInit ignores its name and nothing reads a condition variable name back, so pthread_cond_setname_np now only validates the condition variable and the name. Drops the stale libkernel_sys declaration and moves the debt entry to Silent stubs, citing shadPS4.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Store the name on the condition variable, creating a statically initialized one first, and return EINVAL for a destroyed one. A null cond or a null name throws, recorded in the libkernel debt file.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The wide printf family still formatted floating-point conversions
through the host, while the libc.prx that titles ship gives swprintf the
same text as snprintf: on 199,948 random formats the copy bundled with
PPSA07923 printed identical narrow and wide output, and this build's
wide output differed from it on 23,893. Use the narrow DecimalFloat and
HexFloat for finite values.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Human Fall Flat (PPSA02429) opens its sockets with libkernel's socket()
and registers them with sceNetEpollControl. libSceNet only looked in its
own socket table, so every ADD and DEL failed with SCE_NET_ERROR_EBADF.
The game retries without pause: on box 2 it made more than 1.6 million
failing calls on 14 descriptors in its first seconds, all of them
libkernel sockets.
sceNetEpollControl now accepts a descriptor libkernel has open as a
socket, as sceNetSocketClose and sceNetSetsockopt already do for MXGP 26
(PPSA30839). sceNetEpollWait looks up the host socket of such a
registration through libkernel after g_mutex is released, because that
lookup asks libSceNet's own table for descriptors libkernel does not
own, and keeps the owner alive across the host poll. libkernel's close()
retires the registrations of the closed socket; a wait drops a
registration whose socket is gone.
guest_sce_net registers a libkernel UDP socket, waits for it to become
readable and then writable, deletes it twice, closes registered sockets
through close() and sceKernelClose and waits again, and checks that a
descriptor that was never open still fails with EBADF.
The libc.prx bundled with PPSA02530 keeps error_code values in the second
dword: the shared error_category::default_error_condition shifts the value
into the high half and the equivalent overloads compare that dword and the
category. Export the type info, the base destructor and the three base
members, so titles that import them resolve to the same code the generic
and system category vtables already use.
future_category returns a static _Future_error_category derived from
_Generic_error_category and named "future". Its message maps 1..4 to
"broken promise", "future already retrieved", "promise already satisfied"
and "no state", and falls back to the generic table. future_error is 0x40
bytes: a GuestLocale::String at 0x8 and the 16-byte error_code at 0x30; its
0x30-byte vtable carries the console's _Doraise slot. _Throw_future_error
allocates that size and throws it with the console type info, and
_Rethrow_future_exception delegates to rethrow_exception.