mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-01 12:45:56 +00:00
nanosleep and _nanosleep forwarded the result of sceKernelNanosleep, which returned -1 for a rejected request: errno was never set, and the sce call returned a value that is not an sce error. A request with negative seconds was rejected as well, where FreeBSD's kern_nanosleep returns 0 without sleeping. nanosleep and _nanosleep now return -1 with errno set to EINVAL when tv_nsec is outside [0, 1000000000) and to EFAULT for a null request; sceKernelNanosleep returns the matching SCE_KERNEL_ERROR code. A request with valid nanoseconds and negative seconds returns 0 at once. Co-Authored-By: Claude Opus 5.5 <[email protected]>