Commit Graph
756 Commits
Author SHA1 Message Date
Dean 0ce4b82c2d Merge pull request #10243 from orezraey/fix/libkernel-rtld-thread-atexit-measured-ps5
fix(libkernel): answer the thread atexit references as measured on a PS5
2026-10-26 16:23:13 +13:00
Dean 853ffe0f69 Merge pull request #10794 from slopgobblercobbler/feat/kernel-sys-sce-pthread-main
feat(libkernel_sys): implement scePthreadMain through pthread_main_np
2026-10-26 14:27:16 +13:00
Adrià 3b252b44fe Merge pull request #9561 from DavidSamir/feat/libkernel-fcntl-osync
feat(libkernel): sync each write on a file whose O_FSYNC flag is set
2026-10-26 02:26:06 +01:00
Dean 380ffe3a3a Merge pull request #10456 from alnsx/codex/fix-select-redirected-input
fix(libkernel): poll files on standard descriptors as vnodes
2026-10-26 12:09:32 +13:00
Adrià d19a809639 Merge pull request #9682 from Gruzzberry/feat/settimeofday
feat(libkernel_sys): implement settimeofday
2026-10-25 23:04:11 +01:00
Adrià 26ba9b6b71 Merge pull request #9499 from EagleBearerYS/fix/libkernel-signal-handler-mask
fix(libkernel): block a signal while its handler runs and honour SA_RESETHAND
2026-10-25 22:05:12 +01:00
Adrià 9dbc017c71 Merge pull request #9512 from EagleBearerYS/fix/libkernel-poll-socket-hup
fix(libkernel): clear POLLOUT from a hung-up socket in poll on Linux
2026-10-25 21:16:45 +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à e1ef22e888 Merge pull request #9461 from milescoviello/fix/tsc-calibration-one-cpu
fix(libkernel): measure the TSC frequency on one CPU
2026-10-25 19:48:55 +01:00
Yunus Shaikh d0c945ce86 docs(libkernel): record how poll reports a hung-up stream socket on each host 2026-10-25 19:01:11 +01:00
Adrià 7e4f6e0440 Merge pull request #9482 from valenciana-nc/fix/pthread-attr-ended-thread
fix(libkernel): reject ended threads in pthread_attr_get_np
2026-10-25 18:14:22 +01:00
Adrià f55190f7e3 Merge pull request #9477 from EagleBearerYS/fix/libkernel-udp-unreachable-port
fix(libkernel): stop Winsock failing an unconnected datagram receive after an unreachable port
2026-10-25 18:04:34 +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
Yunus Shaikh f5757aab98 fix(libkernel): restore a handler's signal bit when the handler replaces the mask
A handler that read the mask and put it back with SIG_SETMASK stored its
own signal, which sigprocmask reports from the hold, in the process mask
and cleared the hold, so the signal stayed blocked after the handler
returned. pselect, setcontext and a siglongjmp inside the handler replace
the mask the same way. When the handler's own thread releases a hold, the
signal now gets back its bit from before the handler when the handler
returns, as FreeBSD's sigreturn puts back the mask from before it. A mask
another thread sets meanwhile is kept.
2026-10-25 09:49:35 -07:00
Adrià c661d9fae2 Merge pull request #9133 from fogydes/feat/libSceLibcInternal-posix-spawn
feat(libSceLibcInternal): implement posix_spawn process creation and reaping
2026-10-25 17:38:41 +01:00
alnsx 7eecb44157 chore: merge main after socket debt corrections 2026-10-25 12:23:32 -04:00
David a81fcbfacd feat(libkernel): sync each write on a file whose O_FSYNC flag is set
FreeBSD's F_SETFL may change O_FSYNC (FCNTLFLAGS), and vn_write then
writes with IO_SYNC. The flag now lives in the status table, and the
write entry points sync a regular file after the write while it is set.
2026-10-25 17:13:01 +01:00
Dean 6b46a5dfdb Merge pull request #10299 from orezraey/fix/libkernel-socket-address-measured-ps5
fix(libkernel): check socket address families and lengths as measured on a PS5
2026-10-26 04:45:05 +13:00
valenciana-nc 37ba4a9d2f fix(libkernel): reject ended threads in pthread_attr_get_np 2026-10-25 15:49:57 +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
Yunus Shaikh 8be8dc83af Merge main into fix/libkernel-signal-handler-mask
Main's #10706 moves the declarations of exported functions and their types
into the libraries' public headers, and gives WaitForPendingInSet a
KernelTimespec timeout. The merge keeps this branch's DeliverUnblockedPending
and ChangeBlockedMask with main's KernelTimespec. It takes main's side of
the declarations in GuestSignalSets.cpp, whose setjmp and longjmp this
branch had added and libc's Api.hpp now declares. GuestSignalHandlerMask.cpp
includes the libkernel and libc public headers in place of its own
declarations and GuestSignalSet and GuestSigaction types, as the
public_headers audit requires.
2026-10-25 07:05:46 -07: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
fogydes bde7cc210a fix(libkernel): report ECHILD to a Windows waiter another thread reaps first 2026-10-25 13:57:18 +01:00
fogydes 0514307ab8 fix(libkernel): translate waitpid child statuses to the guest numbering 2026-10-25 13:57:18 +01:00
fogydes df18d83072 docs: add the spawn role variable and shorten the waitpid debt 2026-10-25 13:57:18 +01:00
fogydes 723d932f73 feat(libSceLibcInternal): implement posix_spawn process creation and reaping 2026-10-25 13:57:17 +01:00
Adrià c2e087b2a6 Merge pull request #7049 from blawesom/followup/6510
fix(libkernel): retire an EV_ONESHOT note through its delete callback and follow Windows $Deleted paths
2026-10-25 12:38:21 +01:00
orezraeyandClaude Opus 5.5 b3b0760369 Merge main into fix/libkernel-rtld-thread-atexit-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 08:05:05 -03:00
orezraeyandClaude Opus 5.5 20b38adb09 Merge main into fix/libkernel-socket-address-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 07:53:50 -03:00
Adrià c7d6660ef8 Merge pull request #9365 from thuanquang/docs/debt-sweep-kernel-sockets
docs(libkernel): correct three stale socket statements
2026-10-25 11:47:05 +01:00
Adrià 62660f3309 Merge pull request #9363 from thuanquang/docs/debt-sweep-kernel-misc
docs(libkernel): drop stale mlockall, open file limit and protection bit claims
2026-10-25 11:44:36 +01:00
Adrià 109d288487 Merge pull request #9359 from thuanquang/docs/debt-sweep-kernel-signals
docs(libkernel): drop the stale 32-signal limit from the pthread_sigmask entry
2026-10-25 11:41:41 +01:00
Adrià 43a4a36b95 Merge pull request #9298 from UnhealthyKraken/docs/kernel-cleanup-debt
docs(libkernel): record cleanup unwind and allocation limits
2026-10-25 11:38:09 +01:00
Adrià eddc9f9a09 Merge pull request #9239 from Dom3005/docs/debt-windows-directory-descriptor
docs(debt): match the Windows directory descriptor entry to the code
2026-10-25 11:34:30 +01:00
alnsx d5ed8797cc chore: merge main and use canonical test declarations 2026-10-25 05:46:51 -04:00
Dean 9a2020c220 Merge pull request #10425 from Retr0G28/fix/sendfile-nonregular-einval
fix(libkernel): fail sendfile with EINVAL for a file that is not a regular file
2026-10-25 19:29:21 +13:00
orezraeyandClaude Opus 5.5 472623ec33 docs(libkernel): mark the AF_INET bind and connect check order unmeasured
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 23:55:06 -03:00
orezraeyandClaude Opus 5.5 65e712b9c6 Merge main into fix/libkernel-socket-address-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 23:32:33 -03:00
milescovielloandClaude Opus 5.5 de5306dd29 docs(debt): record the unpinned fallback of the TSC frequency measurement
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 02:25:03 +00:00
Dean a2a67c726e Merge pull request #9059 from mehmetbayoglu/feat/libkernel-tls-get-addr
feat(libkernel): implement __tls_get_addr
2026-10-25 15:23:44 +13:00
Dean d7878da690 Merge pull request #9169 from slopgobblercobbler/fix/socket-addr-validation
fix(libkernel): validate address family against socket family in bind
2026-10-25 15:17:00 +13:00
slopgobblercobbler 9b4a3b3d81 feat(libkernel_sys): implement scePthreadMain through pthread_main_np 2026-10-25 02:28:39 +01:00
slopgobblercobbler 7239ebb63e fix(libkernel): validate address family against socket family in bind 2026-10-25 02:14:14 +01:00
Dean c6b318cfd9 Merge pull request #9165 from MaxLikesCode/fix/pthread-timed-self-lock
fix(libkernel): time out timed locks of a lock the caller already holds
2026-10-25 14:01:45 +13:00
memob cf27259538 feat(libkernel): implement __tls_get_addr
Resolve a FreeBSD/ELF tls_index {module, offset} the way the relinker's
DTPMOD64 values are laid out: on Windows through the PE _tls_index the
module word points at and the thread's ThreadLocalStoragePointer, on
Linux through glibc's __tls_get_addr.
2026-10-24 20:29:20 -04:00
Dean b7865bbb6b Merge pull request #8344 from Retr0G28/fix/socketpair-getpeername-enotconn
fix(libkernel): return ENOTCONN from getpeername once a socketpair peer closed
2026-10-25 13:28:30 +13:00
MaxandClaude Opus 5.5 55ff5484d6 fix(libkernel): time out timed locks of a lock the caller already holds
scePthreadMutexTimedlock on a mutex the caller holds, and
scePthreadRwlockTimedrdlock and scePthreadRwlockTimedwrlock on a rwlock
it holds for writing, returned EDEADLK at once. The console returns
ETIMEDOUT, as the prosper console oracle measured. They now sleep until
the timeout and return ETIMEDOUT, as FreeBSD libthr does. The POSIX
timed locks call these and change with them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 02:15:31 +02: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
Retr0 7a0bbc4897 Merge remote-tracking branch 'origin/main' into fix/sendfile-nonregular-einval
# Conflicts:
#	core/libs/tests/GuestSendfile.cpp
2026-10-25 02:47:13 +03:00