feat(libkernel): query real-time alarms with getitimer #3572
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3572"
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 Lorkydey on 2026-10-11T13:32:23Z.
What
PS5MC 1.2 (PPSA99420, Kodi 22) imports
getitimerfromlibkernel, but maina11c8f7fdoes not export it. Its public release's ELF dynamic symbol 457 is the undefined functionJ1H1QRCJf2Q#M#N; the import metadata maps this tolibkernel. The same missing function is listed for PS5MC in #1578. Searches for the function and its NID found no existing PR; the relevant closed homebrew bundle #3293 also contains no implementation of it.Implement
getitimer(ITIMER_REAL)using the existing guest alarm's synchronized monotonic deadline. It returns normalized, signed 64-bit seconds/microseconds, reports an inactive or expired alarm as zero, and does not reset or cancel it. The interval is zero because the current alarm backend is one-shot. Invalid selectors return guestEINVAL; a null real-timer output returnsEFAULT; success preserves errno. CPU interval timers (ITIMER_VIRTUALandITIMER_PROF) explicitly throw because those timers are not implemented.The ABI and relative-time/error rules follow FreeBSD's getitimer implementation and itimerval definition. No new comments, Markdown changes, dependencies, or generated files.
Tested
Windows 11 Pro 26100, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON.
undefined reference to getitimer_nid_postfix.guest_getitimer,guest_signals,guest_signal_sets,guest_sigtimedwait,guest_process_time, andguest_cpu_time_clocks.libkernel.prxexportsJ1H1QRCJf2Q. Conventions and diff whitespace checks pass.tools/progress.py: system libraries 2903/3383 (85.81%) -> 2904/3384 (85.82%). This is the source counter, not a claim that CPU timers or PS5MC startup are fully supported.Title evidence: the public PS5MC 1.2 Kodi 22 release, archive SHA256
5a9eeff4a0024a341a4924b8d283fe65b4ff94d7f5dbea446c8a677c4db157b6, verified against the catalog and inspected without executing it. PS5MC was not launched; this does not establishgetitimeras its first startup failure. Linux and macOS runtime tests were not run locally.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T13:32:42Z.
Progress report (
a11c8f7→1fc9b4d)📈 System libraries: 85.82% (+0.01%, +1 implemented functions)
✅ 1 implemented
getitimer_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:35:43Z.
Checked build +
guest_getitimeron Linux (passes; fails to link without the change), FreeBSD getitimer errno order/ABI, no NID alias duplicates; merging.