fix(kernel): use SCE kernel error codes in equeue, direct memory and mutex #26
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by QDarkRex on 2026-09-27T06:22:17Z.
Summary
SCE kernel error codes are
0x80020000 + FreeBSD errno(e.g.EINVAL=0x80020016,ETIMEDOUT=0x8002003C).PthreadandSemaphorealready follow this. The constants inEqueue.hppandDirectMemory.hppused an unrelated0x8001xxxxrange, and their low bits don't match their names:EQUEUE_ERROR_ETIMEDOUT0x800100230x8002003CEQUEUE_ERROR_EBADF0x800100160x80020009EQUEUE_ERROR_ENOENT0x800100110x80020002EQUEUE_ERROR_EINVAL/SCE_KERNEL_ERROR_EINVAL(DirectMemory)0x800100050x80020016EQUEUE_ERROR_EFAULT/SCE_KERNEL_ERROR_EFAULT(DirectMemory)0x800100090x8002000ESCE_KERNEL_ERROR_EAGAIN(DirectMemory)0x800100020x80020023SCE_KERNEL_ERROR_ENOMEM(DirectMemory)0x800100070x8002000CSCE_KERNEL_ERROR_EACCES(DirectMemory)0x800100040x8002000DSCE_KERNEL_ERROR_EDEADLK(Mutex.cpp)0x80020023(= EAGAIN)0x8002000BThe most visible effect: a guest waiting on
sceKernelWaitEqueuewith a timeout and checking forSCE_KERNEL_ERROR_ETIMEDOUTsaw an unexpected error on an ordinary timeout. Values were cross-checked against shadPS4'sorbis_error.h.Tests
guest_kernel_errorstest covers:EFAULT,EINVAL,ENOENTandEBADFafter deleteEDEADLKIndependent of #25 and merges cleanly with it (checked locally).
🤖 Generated with Claude Code