libkernel_web forwarded __sys_namedobj_create to libkernel_sys's shared
named-object table but left __sys_namedobj_delete throwing, so an id
created through libkernel_web could not be released through it.
libkernel_sys keeps the delete body in GuestNamedObjectDelete_nid_no_patch,
as it does for create, and both exports call it, so the forward cannot bind
to itself after NID patching.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The firmware 13.60 kernel looks the id up with the type's low 16 bits
ORed with 0x1000, as its create handler stores them, so deleting a live
object with another type fails with ESRCH and keeps it. That settles the
fpPS4/RPCSX disagreement the throw was waiting on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the table of named objects that syscalls 0x22d and 0x22e manage, as
fpPS4's kernel and RPCSX both do: ids from 1 for a name of up to 31
characters, EINVAL for a null name, EFAULT for an unreadable one,
ENAMETOOLONG for a longer one, EAGAIN when no id is left and ESRCH for an id
that is not live. The table holds 65535 ids, RPCSX's bound. Deleting an
object with another type than it was created with throws, because the two
sources disagree on it.