2.4 KiB
2.4 KiB
libSceLibcInternal technical debt
Unknown function info
- _sceLibcInternalThreadAtexit, _sceLibcInternalThreadDtors (libSceLibcInternal) - FreeBSD
__cxa_thread_atexitsemantics assumed; a null or non-image destructor and an allocation failure throw - _sceLibcInternalForceTlsDestructor (libSceLibcInternal) - behaviour follows
sceLibcForceTlsDestructor(int)in a title'slibc.prx(disassembly): the calling thread's destructors whose dso belongs to the module run newest first, only if the dso's module is loaded and the dso points to itself, in up to 4 passes. The return type is unknown (that function returns nothing), 0 is returned. The module of each dso is looked up when the destructors are forced, not when they are registered aslibc.prxdoes
Functional
- makecontext (libSceLibcInternal) follows FreeBSD 11's
lib/libc/amd64/gen/makecontext.c: at most six arguments, a stack of at leastMINSIGSTKSZ(2048) bytes, andexit(0)when the function returns with nouc_link. The console's version is not verified - makecontext (libSceLibcInternal) on Windows pins its stack writable until a later
makecontextstack overlaps it, since nothing tells the library when the guest frees the stack - Thread exit destructors (libSceLibcInternal) run when a libkernel thread finishes; on the main or a host thread only
_sceLibcInternalThreadDtorsruns them, asexitdoes, else they are dropped - fstatvfs (libSceLibcInternal) converts
_fstatfsto the 88-bytestruct statvfsas FreeBSD 9.2'ssfs2svfsdoes (f_bsizefrom the transfer size,f_frsizefrom the block size,f_favailequal tof_ffree,f_fsid0,ST_RDONLYandST_NOSUIDonly). Differences:f_namemaxis thestatfsvalue, notfpathconf(_PC_NAME_MAX); negativef_bavailandf_ffreewrap to unsigned withoutEOVERFLOW, as the same-width copy in FreeBSD does; inode counts are 0 on Windows, inherited from_fstatfs; a null output returnsEFAULTafter the descriptor is validated, where FreeBSD would fault. Layout and conversion are unverified against the PS5 library (PS5MC importsfstatvfsbut was not run)