fun checkThreadIDAllow0(uid: Int): Int { var uid = uid if (uid == 0) { uid = currentThread.uid } if (!threadMap.containsKey(uid)) { log.warn(String.format("checkThreadID not found thread 0x%08X", uid)) throw SceKernelErrorException(ERROR_KERNEL_NOT_FOUND_THREAD) } if (!SceUidManager.checkUidPurpose(uid, "ThreadMan-thread", true)) { throw SceKernelErrorException(ERROR_KERNEL_NOT_FOUND_THREAD) } return uid }
Check the validity of the thread UID . Allow uid=0 .