libkernel: setitimer is absent (PS5MC); branch ready on the alarm timer, never reporting an undelivered signal #3735
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T16:12:15Z.
libkernel does not export
setitimer(NIDhPWDGx8ioXQ). PS5MC (PPSA99420) imports it (registry index 472, predictedFAIL: unresolved ELF import hPWDGx8ioXQ from libkernel.prx). The earlier #3293 was closed for reporting success without delivering the signal; this branch never does that.Branch ready:
screamm:feat/libkernel-setitimer(6bef7bf0, one commit onmaina11c8f7f). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.getitimeris left to the open #3572; whichever merges second must read the interval this branch stores (alarms.interval), since #3572 reports it as always 0.alarmtimer thread, following FreeBSD 11.4sys/kern/kern_time.c(sys_setitimer,kern_setitimer,realitexpire,itimerfix) andlib/libc/gen/alarm.c(8c639945):EINVALfor an unknown timer or a value/interval with a negative field,tv_usec >= 1000000or more thanINT32_MAX/2seconds; a null value reads the timer (EFAULTwhen the output is null too, after the timer check as FreeBSD orders it); a zero value disarms and returns the previous remaining time and interval; a non-zero value arms, re-armed byit_intervalon expiry;alarmnow clears the interval as FreeBSD's does.SIGALRMhandler installed (no path runs a guest handler here;alarmalready throws the same way), expiry whileSIGALRMis blocked (pending signals are not modelled; this also correctsalarm, which wrongly exited in that case), an interval below 1 ms (FreeBSD rounds totick/16and the console'shzis unknown), and armingITIMER_VIRTUAL/ITIMER_PROF(CPU-time accounting is not modelled; reading or disarming them is exact at zero).SIG_IGNdrops the expiry and the default disposition exits with 142, as before.guest_itimer(about 1 s) covers the error cases with the output untouched, disarm returning the previous value, the countdown, re-arm by interval, the CPU timers, thealarminterplay and the throw message at expiry (it_interval 0.250000 s) with the handler never running.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_itimerandguest_signals3/3 (guest_itimer10/10 in the worktree);ctest -j8 -E "^agc_driver_|^video_out_flip"534/537, the failures being the knownwindows_exceptions(#3411, fixed by #3415),guest_kernel_sys(#3510) andguest_filesystem(#3518); withmain'Imported from boykopovar/AnyPS5. Originally posted by ArekatlaNishanthchowdary on 2026-10-11T17:44:14Z.
Windows verification of
screamm:feat/libkernel-setitimer(6bef7bf0b), cherry-picked unchanged ontomaina11c8f7f7asArekatlaNishanthchowdary:feat/libkernel-setitimer(5d21483ae), authorship kept.Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release:
guest_itimerpasses.ctest: onlyguest_kernel_sys(#3510),windows_exceptions(#3411),agc_driver_emulated_color_compareandguest_filesystem(#3518) fail, the same as unmodifiedmainon this host.tools/check_conventions.py --base origin/mainpasses. No title or homebrew run. Linux not run.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T08:25:04Z.
I carried the offered
setitimerimplementation into PR #4382, preserving the source commit author. I integrated it with currentmain’s existinggetitimerand alarm timer state. Linux Release GCC 12.2 builds ofguest_itimer_testsandguest_signal_testspassed; both focused CTests passed 1/1, and conventions/diff checks passed. The PR leavesgetitimeras implemented on main.