_submit executes inline only when the queue is neither running nor holding
pending work; otherwise it enqueues a copy and returns the id, so the
statement that buffers without a wait always complete first was wrong.
TechnicalDebt.md only links back to this section; the list of calls that
act on a cancellation request and the note on the asynchronous type are
the Thread cancellation entry of debt/libkernel.md.
The table said Aps5StartGuest had no implementation on main, but
MainThreadMacOs.cpp defines it and libkernel's CMakeLists builds it. It
starts the guest on a second pthread (at least 8 MiB of stack) as
entry(block, nullptr) while the main thread runs the CFRunLoop, and it
aborts if the entry returns.
The directory limits (128 records, 256 MiB) throw CaptureLimit, which
WriteOptional catches: capture disables itself with one stderr line and
the pipeline is still created. Only the per-record 36 MiB limit throws
out of the capture, so the old sentence described both as an error.
TraceThread::Slice holds five eight-byte members (scope, stage, begin,
length and the recorder batch), so an event takes 40 bytes, not 32.
The example sizes follow: 10 MiB at the default 262,144 events, 120 MiB
at 3,145,728 and 160 MiB at the 4,194,304 maximum.
With symbolic links allowed on Windows, guest_file_timestamps hung until
the CTest timeout: its link.txt is dangling (the relative target resolves
beside the link), MinGW's std::filesystem::remove_all reads links through
stat, sees it as absent and spins on a directory it cannot empty. The
test now removes the link with unlink_nid_postfix first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main took request serialization version 48 for the fragment barycentric
built-ins flag (#9193). The depth export clamp bounds are now written at
version 49 and read only for versions from 49, so a version 48 request as main
writes it still decodes, with default bounds. Tests: version 49 is the
emitted prefix, 50 the first unsupported one, a depth exporting request
without its bounds decodes at 48, 47 and 46 (the last two without main's
barycentric byte), and a version 48 two-sample dithered request decodes as
written.
scePthreadMutexattrSetkind called NotImplemented_nid_no_patch for a kind
outside 1 to 4. Firmware 13.42's libkernel, run in an emulator, makes it
call pthread_mutexattr_setkind_np, which stores any kind as a signed
16-bit value and returns 0, and turns a null attribute's -1 with errno 22
into 0x8001FFFF. It now forwards to pthread_mutexattr_setkind_np and
converts the result with sceKernelError, so a null attribute or object
still returns 0x8001FFFF and now also sets errno 22.
An out-of-range kind is refused by scePthreadMutexInit with 0x80020016,
leaving the mutex untouched, as measured for the same module.
scePthreadMutexattrGetkind is unchanged; kind 0 now reaches it and
returns 0.
With symbolic links allowed on Windows, guest_kernel_sys failed at its
cleanup: MinGW's std::filesystem::remove reads links through stat, so a
dangling link looks absent and is left in place, and the check expecting
true fails. The two links are now removed with unlink_nid_postfix, which
also checks that guest unlink removes a live and a dangling link.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceKernelTruncate and truncate checked for a symbolic link loop only
after the native truncate failed, but on Windows std::filesystem::status
already reports a self-referencing link as missing, so the call returned
ENOENT before reaching that check. The loop check now runs before the
not-found result too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SuspendThread fails with STATUS_THREAD_IS_TERMINATING for a thread that
has begun to exit while its handle is not signaled yet. TryDeliver took
only the signaled handle as an exit, so the raise deliverer, which keeps
sweeping a target in host code until delivery or exit, threw "cannot
suspend the target thread" and aborted the process when that target
exited in between. The suspension now reads the NTSTATUS from
NtSuspendThread and treats a terminating target as exited; other
failures still throw.
guest_raise_exiting_thread raises at 32 threads per round that block in
a host wait and exit after it, for 100 rounds.
Cover non-null callback registration before init, post-unregister noCallback state on duplicate unregister and device registration, and null parameter initialization.
Cover errno preservation across multiple values, exact-size 24-byte and raw 64-bit word buffers, idempotent calls, and expanded alignment/pattern grid.
A library's imports were renamed in place, so any import whose NID is
longer than its name failed the build: libSceHttp2 importing sceNetRecv
(10 characters, NID 11) stopped at "import NID longer than original
name". Such imports now get their hint/name entry in the appended
.nidimp section that --exec mode already uses, with both thunks
repointed; names that fit are still patched in place, so a library
without short imports keeps its layout. Signed, bound and delay-loaded
imports are rejected before anything is written whenever names move.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#9193 added fragmentBarycentricBuiltins and cleared it in
PixelBarycentricEmulation, but MeshBarycentricEmulation still takes
the flag from the device. On a device with
VK_KHR_fragment_shader_barycentric the host interpolation check then
reads I/J from BaryCoordKHR, the pixel shader does not emulate
barycentrics, and the test fails before its first draw.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The libc.prx that titles ship evaluates the rational step as
((Q(z) + g*P(z)) + 1) / ((Q(z) - g*P(z)) + 1), with its own ln 2 split
and coefficients in the double case, and returns 1 only for arguments
within half an epsilon of zero. main used a different rational form
with a doubling step and an epsilon-wide shortcut, which left about one
result in five one ulp away from titles.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The round trip configures with -G Ninja but only skipped when CMake was
missing, so it errored on hosts without Ninja. Require both, like the
other configure seed project tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>