Commit Graph
161 Commits
Author SHA1 Message Date
Adrià d19a809639 Merge pull request #9682 from Gruzzberry/feat/settimeofday
feat(libkernel_sys): implement settimeofday
2026-10-25 23:04:11 +01:00
Adrià aeff26bd97 Merge pull request #9573 from zaryabzip/feat/pthread-create-suspended
feat(libkernel_sys): create threads suspended and resume them
2026-10-25 20:21:07 +01:00
Adrià 08f2d02a56 Merge pull request #9171 from DavidSamir/feat/libkernel-sys-getlogin-futimesat
feat(libkernel): implement getlogin
2026-10-25 17:54:15 +01:00
zaryabzip 0b60e97834 feat(libkernel_sys): create threads suspended and resume them
Implement pthread_attr_setcreatesuspend_np, pthread_resume_np,
pthread_resume_all_np and pthread_multi_np with the sce forms
scePthreadAttrSetcreatesuspend, scePthreadResume, scePthreadResumeAll
and scePthreadMulti, following FreeBSD 11.4 libthr and the firmware
13.42 libkernel_sys module. A thread created suspended waits before its
start routine, outside any cancellation point, until it is resumed.
sceKernelRaiseException throws on Windows for a thread still suspended
at creation.
2026-10-25 21:51:02 +05:00
Adrià 355dd435e4 Merge pull request #9379 from DavidSamir/feat/libkernel-sys-swapcontext
feat(libkernel): implement swapcontext
2026-10-25 16:16:48 +01:00
Adrià FranchandClaude Sonnet 5.5 f63b27bdaa feat(libkernel): implement getlogin
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 15:07:38 +01:00
GruzzberryandClaude Opus 5.5 e6b07323de feat(libkernel_sys): implement settimeofday
FreeBSD 11.4's kern_settimeofday rejects a timeval with a microsecond
field outside 0 to 999999 or a negative second field with EINVAL before
changing anything, sets the clock from a valid timeval, and then stores
the timezone, which gettimeofday reports. settimeofday now checks the
timeval the same way and throws for a valid one, as clock_settime does,
because the host clock is not changed. A timezone given without a
timeval is stored and gettimeofday reports it instead of 0 and 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 13:20:31 +00:00
Adrià 460d46c4e8 Merge pull request #9172 from hypermoist/fix/kernel-sys-firmware-constants
fix(libkernel_sys): return what the firmware returns from 20 calls it does not implement
2026-10-25 13:31:30 +01:00
Adrià FranchandClaude Sonnet 5.5 3bf3f7928b fix(libkernel): declare swapcontext in libkernel's Api.hpp
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 13:04:17 +01:00
David 5881575782 refactor(libkernel): export swapcontext from libkernel directly
The PS5 3.20 export lists have swapcontext in libkernel as well as
libkernel_sys, and on Windows a libkernel import never reaches
libkernel_sys. The assembly entry in UserContext.cpp now is
swapcontext_nid_postfix, and the libkernel_sys jump stub is gone.
2026-10-25 13:04:08 +01:00
David ad0d4f5995 feat(libkernel_sys): implement swapcontext 2026-10-25 13:04:08 +01:00
ali zedan 2c5fcf6406 fix(kernel): safely copy guest path arguments 2026-10-25 08:28:09 +01:00
Dean 61fc572cee Merge pull request #10434 from Retr0G28/fix/linkat-directory-descriptor
fix(libkernel_sys): resolve linkat paths relative to a directory descriptor
2026-10-25 19:16:10 +13:00
Dean cf528e78c6 Merge pull request #9160 from yabanana/feat/kernel-sys-thread-queries
feat(libkernel_sys): identify the initial pthread
2026-10-25 12:57:53 +13:00
hypermistandClaude Opus 5.5 3dd4e1fd18 Merge remote-tracking branch 'upstream/main' into fix/kernel-sys-firmware-constants
Clean merge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 12:56:11 +13:00
Daniele Giovane 32926902b8 Merge main and leave pthread attributes to the earlier contribution 2026-10-24 22:38:29 +02:00
boykopovar fdf9ca7574 fix(sdk): reconcile public headers after rebase 2026-10-24 23:17:47 +03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Retr0 2d32e8bd85 fix(libkernel_sys): check the linkat source before resolving the target 2026-10-24 16:00:43 +03:00
Dean 9a1ea5de1b Merge pull request #10110 from BunnyFl/feat/libkernel-version-trace-queries
feat(libkernel): implement the system-ex version, lower-limit and trace memory queries
2026-10-25 01:53:38 +13:00
Dean Galvin b0b291be0b Merge main into feat/libkernel-sys-underscore-openat 2026-10-24 21:42:59 +13:00
Dean e058b3284a Merge pull request #9167 from slider/feat/libkernel-named-semaphores
feat(libkernel): implement named POSIX semaphores
2026-10-24 21:09:30 +13:00
Dean dd04e33b38 Merge pull request #10363 from cadenasynyster/fix/windows-mkdirat-loop
fix(libkernel_sys): report ELOOP from mkdirat through a Windows symli…
2026-10-24 16:36:38 +13:00
Retr0 d44d5685eb fix(libkernel_sys): resolve linkat paths relative to a directory descriptor 2026-10-24 02:58:00 +03:00
Dean d8b73e3644 Merge pull request #9273 from DavidSamir/feat/libkernel-sys-pselect
feat(libkernel): implement pselect over select
2026-10-24 12:53:12 +13:00
Dean c675a415f2 Merge pull request #9103 from HQasper/claude/project-thread-w0s18y-chown
feat(libkernel_sys): implement chown, lchown, fchownat and linkat
2026-10-24 11:56:40 +13:00
Dean fac234a47c Merge pull request #9134 from orezraey/fix/libkernel-event-flag-measured-ps5
feat(libkernel): match event flags to PS5 and add shared flags
2026-10-24 09:12:14 +13:00
Dean a42f61d5b1 Merge pull request #10060 from xXPBSXx/carry/6525-fpathconf
feat(libkernel_sys): implement fpathconf and _fpathconf
2026-10-24 09:03:45 +13:00
cadenasynyster 0aef357591 fix(libkernel_sys): report ELOOP from mkdirat through a Windows symlink loop on a descriptor
On Windows, mkdirat with a directory descriptor and a relative path that goes through a symbolic link pointing to itself reported EIO. CreateDirectoryW fails with ERROR_CANT_RESOLVE_FILENAME for such a path, and the error mapping had no case for it, so it fell through to GuestEio. FreeBSD fails the lookup with ELOOP. The path form of mkdir and openat with the same descriptor already return ELOOP. ERROR_CANT_RESOLVE_FILENAME now gives ELOOP.

guest_kernel_sys gains a Windows check with a file-type and a directory-type self-loop: mkdirat through the loop returns ELOOP and mkdirat of the link itself still returns EEXIST. The check is skipped when the host denies symbolic link creation.
2026-10-23 21:17:33 +02:00
Dean 9fbcb97d5f Merge pull request #10073 from JJenkx/windows/link-symlink-loop
fix(libkernel_sys): report ELOOP from link through a Windows symbolic link loop
2026-10-24 03:24:38 +13:00
xXPBSXxandClaude Sonnet 5.5 01655d7219 fix(libkernel_sys): answer fpathconf for pipes and _PC_ASYNC_IO as FreeBSD does
kern_fpathconf answers _PC_ASYNC_IO with _POSIX_ASYNCHRONOUS_IO (200112) after the descriptor lookup, and a pipe or socket (no vnode) with PIPE_BUF for _PC_PIPE_BUF and EINVAL for every other name. Drop the unused File.hpp include and the duplicate KernelErrors.hpp include.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:44:46 +02:00
xXPBSXxandClaude Sonnet 5.5 4e7e4eed8f fix(libkernel_sys): check the fpathconf descriptor with fstat
DescriptorIsOpen_nid_no_patch is not extern "C", so the patched libkernel.prx
does not export it and libkernel_sys.prx fails to load (patched_libraries:
LoadLibraryEx error 127). Check the descriptor like fchown does: GuestFstat on
Windows, fstat elsewhere, EBADF on failure.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:44:45 +02:00
QuentinRemondandClaude Sonnet 5.5 07d3d6447a feat(libkernel_sys): implement fpathconf and _fpathconf
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:44:43 +02:00
Dean 58ceeb8ed5 Merge pull request #9040 from YossiYad/feat/kernel-sys-workaround-process-type
feat(libkernel_sys): implement sceKernelTitleWorkaroundIsEnabled and sceKernelGetProcessType
2026-10-24 00:33:16 +13:00
hypermistandClaude Opus 5.5 da6deaf10a Merge remote-tracking branch 'upstream/main' into fix/kernel-sys-firmware-constants
Keep the constants test beside main's barrier and pthread tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013XFS3FUfBtqCVfwmBrRQ6q
2026-10-24 00:28:21 +13:00
Daniele Giovane bc00fafac0 Merge main and address review for PR 9160 2026-10-23 12:45:54 +02:00
BunnyFlandClaude Opus 5.5 9aa0f22dc7 feat(libkernel): implement the system-ex version, lower-limit and trace memory queries
sceKernelGetSystemExVersion, sysKernelGetLowerLimitSysexVersion,
sysKernelGetLowerLimitUpdVersion and sceKernelGetTraceMemoryStats were
NotImplemented stubs in libkernel_sys. libkernel, libkernel_sys and
libkernel_web of firmware 13.42 answer them without asking the kernel:
empty strings, a zero version and zero statistics, with the null checks
and return codes the firmware uses, including the plain 22 of
sceKernelGetSystemExVersion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:29:49 +02:00
Dean 513ca7e558 Merge pull request #9141 from MarrasFederico/feat/kernel-sys-pthread-scope-atfork
feat(libkernel_sys): implement the scePthread scope, atfork and setconcurrency forms
2026-10-23 23:18:24 +13:00
Dean ff191e29d1 Merge pull request #9382 from MarcZX10/codex/libkernel-sys-sched-interval
feat(libkernel_sys): implement sched_rr_get_interval
2026-10-23 22:47:27 +13:00
Dean 1f1acb195e Merge pull request #9322 from zaryabzip/feat/kernel-sys-condattr-getclock
feat(libkernel_sys): implement scePthreadCondattrGetclock
2026-10-23 22:16:46 +13:00
Dean Galvin cee93db419 Merge main into feat/kernel-sys-thread-queries 2026-10-23 21:45:17 +13:00
Dean aef58d4674 Merge pull request #9355 from DavidSamir/feat/libkernel-sys-aio
feat(libkernel_sys): implement the POSIX aio calls
2026-10-23 21:28:48 +13:00
JJenkxandClaude Opus 5.5 1c026e5fee fix(libkernel_sys): report ELOOP from link through a Windows symbolic link loop
link took the source's std::filesystem::status first, and MinGW-w64's
libstdc++ reports a Windows symbolic link loop as not found (ENOENT), so
it returned ENOENT before FollowLinkPath, which maps the loop's
ERROR_CANT_RESOLVE_FILENAME to ELOOP, was reached. guest_kernel_sys's
loop case failed at that check wherever symbolic links can be created
(Windows 11 22H2: "check failed at line 835 (guest errno 2)").

When the status reports the source missing, ask FollowLinkPath first:
a loop now returns ELOOP and a dangling link still ENOENT; a missing
path is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 04:18:56 -04:00
Yossi Yadgar c9828c6d3a feat(libkernel_sys): report the big-application process type for the title's own pid 2026-10-23 11:12:16 +03:00
Yossi Yadgar 380867d173 feat(libkernel_sys): read the title workaround bits 2026-10-23 11:12:16 +03:00
Dean f075f91737 Merge pull request #9314 from DavidSamir/feat/libkernel-sys-ktimer
feat(libkernel): implement SIGEV_NONE POSIX timers
2026-10-23 20:34:29 +13:00
zaryabzip 6653dffe62 feat(libkernel_sys): implement scePthreadCondattrGetclock
Read the clock of a libkernel condition attribute, returning
SCE_KERNEL_ERROR_EINVAL for a null or destroyed attribute as
scePthreadCondattrSetclock does, after FreeBSD 11.4 libthr's
_pthread_condattr_getclock. A null clock pointer throws.
2026-10-23 12:17:02 +05:00
Dean c31f139db4 Merge pull request #8890 from UnhealthyKraken/feat/libkernel-pthread-timedjoin
feat(libkernel): implement pthread_timedjoin_np
2026-10-23 20:05:52 +13:00
Claude 705f6e1580 feat(libkernel_sys): implement chown, lchown, fchownat and linkat
All four exports threw. The ownership calls follow fchown: owner and
group 0 and the unchanged value are accepted and any other value
throws. The path is looked up first with stat, lstat or fstatat, as
FreeBSD 11's kern_fchownat does, so a lookup error is returned before
the owner is checked. fchownat rejects flags other than
AT_SYMLINK_NOFOLLOW with EINVAL. linkat passes AT_FDCWD and absolute
paths to link and rejects flags other than AT_SYMLINK_FOLLOW with
EINVAL; a relative path with a directory descriptor and a symbolic
link source without AT_SYMLINK_FOLLOW throw. On Windows a symbolic
link source is detected with the file attributes, since libstdc++
there reports it as a regular file.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-23 06:34:32 +00:00
Dean 9af7d8d810 Merge pull request #8987 from simonbronk/feat/libkernel_sys-pthread-barrier
feat(libkernel_sys): implement the scePthreadBarrier, cpuclockid, concurrency and msync forms
2026-10-23 19:24:34 +13:00