feat(libkernel): report _SC_CLK_TCK through sysconf #5185
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5185"
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 p3n1cillin on 2026-10-13T14:09:55Z.
What
Once PS5MC (PPSA99420, Kodi 22, catalog release) gets past mimalloc (#5184), its embedded Python fails while importing
posix, and Kodi exits:CPython raises "cannot read ticks_per_second" when
sysconf(_SC_CLK_TCK)is below 1. AnyPS5'ssysconfreturned -1 withEINVALfor_SC_CLK_TCK(3), since it knew only the page size, the processor counts and the physical pages.sysconf(_SC_CLK_TCK)now returns 128: FreeBSD'ssysconfreturnsCLK_TCK, whichtime.hdefines as 128, and_SC_CLK_TCKis 3 in FreeBSD'sunistd.h. AnyPS5 has notimes()that reports ticks at another rate. The console's value is not checked; this is recorded under Unknown function info indocs/dev/debt/libkernel.md.Tested
main3faa9cb40with #4379, #4374, #4383, #5183 and #5184, and without the host'sHOME(Git Bash sets it; the guest environment is seeded from the host, and Kodi then puts its profile under the host home). Before, it exits as above about 3 s in. After, Python'sposiximport gets further and Kodi stops onioctlFIOCLEX(#5186); with that too, Kodi creates its GUI and runs for the whole 90 s run.guest_system_configurationcheckssysconf(3) == 128witherrnounchanged. All 125 libkernel tests pass on Windows; Linux was not built locally.python tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T14:34:47Z.
Linux run: Ubuntu in WSL2, GCC 15.2.0, Ninja Release,
BUILD_TESTING=ON, full build of a local test head838d4fd85. That head ismain3faa9cb40with this PR, my other open libkernel PRs (#5013, #5061, #5078, #5098, #5183–#5187, #5191) and the open PRs the catalog titles need (#4377, #4379, #4374, #4383, #3798, #4467, #4863, #4105). All 123 libkernel and 69 libc tests pass, includingguest_system_configuration,guest_getrlimit,guest_kernel_fcntl,guest_freebsd_clocks,guest_kernel_sysandguest_filesystem. Not built alone on Linux; no title run on Linux.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T18:37:54Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/libkernel.mdL17Imported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-13T18:48:22Z.
Tested on Linux x86-64 (Release build), with this PR alone (
72a685b90) merged into main9d0a41d5a:guest_system_configurationpasses.guest_system_configurationaborts.AI-assisted: yes (Claude Code)