The mutex yield step counts each yield in a counter that
MutexYieldsForTest_nid_no_patch reads. With no spins and a yield count
of 5, a waiter woken while another thread holds its mutex must yield
exactly 5 times before it blocks, for each mutex type and for the outer
level of a recursive mutex held twice. With WakingLock::lock calling
the native lock directly the count stays 0 and the test aborts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
FreeBSD 11.4's _mutex_cv_lock takes the mutex back through
mutex_lock_common, so a woken waiter tries once, spins and yields by
the mutex's counts before it blocks. The wait here called the native
lock directly; it now goes through the same spin and yield path as
scePthreadMutexLock.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
guest_timed_wait_cpu aborts on the Windows CI runner after printing the
scePthreadCondTimedwait(500 us) CPU line (job 124274871982, main
37277ea18f). The test requires the 99th percentile of each set of waits
under 3 ms and the longest under 10 ms. ctest runs it with --parallel 4
beside tests such as guest_usb_storage, guest_nanosleep_long_request and
the guest_raise tests. Their threads keep the runner's CPUs busy, so a
woken waiter can wait more than a scheduler quantum before it runs: a
failing run measured a 13.25 ms condition wait and a 23.3 ms usleep.
The test now runs with RUN_SERIAL on Windows, as guest_pthread_start and
audio_out2_timing do. The bounds are unchanged.
sched_getparam, sched_getscheduler and sched_setparam with the own pid
from a thread other than the main thread act on the main thread once it
has registered through scePthreadSelf, as FreeBSD's p1003_1b.c selects
the first thread. Before registration, after the main thread exits and
on macOS they still throw.
MihawkOS (PPSA99170) reads sysctl {1, 14, 8, 0} while it starts and the
runtime throws on the unsupported MIB, which aborts the title.
KERN_PROC_PROC takes no pid, so the node lists the one guest process the
runtime hosts, as the same kinfo_proc kern.proc.pid already builds.
AI-assisted: yes
FreeBSD's mutex_lock_common tries the lock before mutex_lock_sleep
spins or yields, so a free mutex with yield loops and no spins was
yielding before its first try here.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lock and timed lock now try the mutex up to the spin count with a pause
between tries, then up to the yield count with a yield before each try,
before they block, as FreeBSD 11.4's mutex_lock_sleep does. Trylock and
a lock the thread already holds do not spin. A uniprocessor host skips
the spins and keeps the yields.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mapping a direct memory range that includes an unallocated physical
page threw std::invalid_argument and ended the process. It now returns
ENOMEM before anything is mapped, as shadPS4's MemoryManager::MapMemory
does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
KytyPS5 and shadPS4 return EFAULT for a null name. The test keeps that
and the rename and clear checks, and drops the null address, zero length
and past-the-end cases that no reference covers; the debt entry records
them as unknown, with the 32-byte name limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>