Check thread param on posix_pthread_rename_np (#2133)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions

This commit is contained in:
Stephen Miller 2025-01-12 03:24:49 -06:00 committed by GitHub
parent 466e071c97
commit 8a309c30a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -386,6 +386,9 @@ int PS4_SYSV_ABI posix_sched_get_priority_min() {
} }
int PS4_SYSV_ABI posix_pthread_rename_np(PthreadT thread, const char* name) { int PS4_SYSV_ABI posix_pthread_rename_np(PthreadT thread, const char* name) {
if (thread == nullptr) {
return POSIX_EINVAL;
}
LOG_INFO(Kernel_Pthread, "name = {}", name); LOG_INFO(Kernel_Pthread, "name = {}", name);
Common::SetThreadName(reinterpret_cast<void*>(thread->native_thr.GetHandle()), name); Common::SetThreadName(reinterpret_cast<void*>(thread->native_thr.GetHandle()), name);
thread->name = name; thread->name = name;