Repository navigation
feat(libkernel): report _SC_CLK_TCK through sysconf - #5185
Merged
oneandonlydean merged 1 commit intoOct 14, 2026
Merged
Conversation
The Python in PS5MC (PPSA99420) reads sysconf(_SC_CLK_TCK) while importing its posix module and failed with "cannot read ticks_per_second". It returns FreeBSD's CLK_TCK, 128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
Author
|
Linux run: Ubuntu in WSL2, GCC 15.2.0, Ninja Release, |
10 tasks done
11 tasks done
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 feat(libkernel): carry chflags implementation #4379, feat(libkernel): implement getpriority for the guest process #4374, feat(libkernel): implement sigpending #4383, feat(libkernel): add clock_settime with FreeBSD argument checks #5183 and feat(libkernel): report vm.overcommit through sysctlbyname #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(fix(libkernel): handle FIOCLEX and FIONCLEX in ioctl #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