You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libkernel: setitimer is absent (PS5MC); branch ready on the alarm timer, never reporting an undelivered signal #3735
libkernel does not export setitimer (NID hPWDGx8ioXQ). PS5MC (PPSA99420) imports it (registry index 472, predicted FAIL: 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 on maina11c8f7f). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. getitimer is left to the open #3572; whichever merges second must read the interval this branch stores (alarms.interval), since #3572 reports it as always 0.
Built on the existing alarm timer thread, following FreeBSD 11.4 sys/kern/kern_time.c (sys_setitimer, kern_setitimer, realitexpire, itimerfix) and lib/libc/gen/alarm.c (8c639945): EINVAL for an unknown timer or a value/interval with a negative field, tv_usec >= 1000000 or more than INT32_MAX/2 seconds; a null value reads the timer (EFAULT when 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 by it_interval on expiry; alarm now clears the interval as FreeBSD's does.
What throws, with the reason named: expiry with a guest SIGALRM handler installed (no path runs a guest handler here; alarm already throws the same way), expiry while SIGALRM is blocked (pending signals are not modelled; this also corrects alarm, which wrongly exited in that case), an interval below 1 ms (FreeBSD rounds to tick/16 and the console's hz is unknown), and arming ITIMER_VIRTUAL/ITIMER_PROF (CPU-time accounting is not modelled; reading or disarming them is exact at zero). SIG_IGN drops the expiry and the default disposition exits with 142, as before.
New 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, the alarm interplay 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 including libs: guest_itimer and guest_signals 3/3 (guest_itimer 10/10 in the worktree); ctest -j8 -E "^agc_driver_|^video_out_flip" 534/537, the failures being the known windows_exceptions (#3411, fixed by #3415), guest_kernel_sys (#3510) and guest_filesystem (#3518); with main'
Activity
ArekatlaNishanthchowdary commented on Oct 11, 2026
I carried the offered setitimer implementation into PR #4382, preserving the source commit author. I integrated it with current main’s existing getitimer and alarm timer state. Linux Release GCC 12.2 builds of guest_itimer_tests and guest_signal_tests passed; both focused CTests passed 1/1, and conventions/diff checks passed. The PR leaves getitimer as implemented on main.
Activity
ArekatlaNishanthchowdary commentedon Oct 11, 2026
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(fix(libkernel_sys): create symlinks with CreateSymbolicLinkW on Windows #3510),windows_exceptions(Windows: windows_exceptions fails since #1423, unwinding through runtime DLL frames (std::call_once) no longer reaches the catch #3411),agc_driver_emulated_color_compareandguest_filesystem(test(libkernel): don't require restoring the directory time on Windows #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).
MarcZX10 commentedon Oct 12, 2026
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.