Repository navigation
feat(libkernel): add getdtablesize - #5069
Closed
ErenYeager1836 wants to merge 1 commit into
Closed
ErenYeager1836 wants to merge 1 commit into
ErenYeager1836 wants to merge 1 commit into
Conversation
getdtablesize (sZuwaDPATKs, aerolib) is a throwing export. FreeBSD 11.4 makes it system call 89, sys_getdtablesize (sys/kern/kern_descrip.c:338-355, freebsd-src 8c639945a44588f6cfdddfb057bb5aad88735da0): min(lim_cur(RLIMIT_NOFILE), maxfilesperproc); FreeBSD 11.4 has no lib/libc/gen/getdtablesize.c. Neither the console's RLIMIT_NOFILE soft limit nor kern.maxfilesperproc is published: shadPS4 443f0224 has no getdtablesize or RLIMIT_NOFILE (its posix_sysconf table answers _SC_OPEN_MAX with -1, without a stated source), KytyPS5 4733b7e and OpenOrbis 0a1aaf9d have neither, fpPS4 04cefd43 returns High(Integer) as a placeholder, SharpProspero 5dfdb4b0 only binds it. getrlimit keeps throwing for RLIMIT_NOFILE for the same reason. Recorded in technical debt. VLC (PPSA85300) and XPSemu (PPSA97358) import it and call it only from their own closefrom (ZiZc3/VLC f3253020 and ZiZc3/XPSemu 8eec07b4, ps5/compat/libc_stubs.c:67-73).
This was referenced Oct 13, 2026
|
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.
|
Collaborator
|
Closing as a duplicate: #5061 (opened earlier) adds the same Feel free to reopen if #5061 is closed without merging, or if you add a real implementation backed by a measured value. |
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
getdtablesize(NIDsZuwaDPATKs, aerolib) is a throwing export. FreeBSD 11.4 makes it system call 89,sys_getdtablesize(sys/kern/kern_descrip.c:338-355):min(lim_cur(RLIMIT_NOFILE), maxfilesperproc). Neither the console'sRLIMIT_NOFILEsoft limit norkern.maxfilesperprocis published;getrlimitkeeps throwing forRLIMIT_NOFILEfor the same reason. Recorded in technical debt.VLC (PPSA85300) and XPSemu (PPSA97358) import it and call it only from their own
closefrom:so the value decides how many
closecalls run. With the export, the unresolved import error is resolved.Carried from @screamm / David with author attribution preserved.
Tested
guest_getrlimittest suite passes.tools/check_conventions.pypasses.tools/check_test_registration.pypasses.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)