Skip to content

Commit

Permalink
Check thread param on posix_pthread_rename_np (shadps4-emu#2133)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMiller123 authored Jan 12, 2025
1 parent 466e071 commit 8a309c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/libraries/kernel/threads/pthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
if (thread == nullptr) {
return POSIX_EINVAL;
}
LOG_INFO(Kernel_Pthread, "name = {}", name);
Common::SetThreadName(reinterpret_cast<void*>(thread->native_thr.GetHandle()), name);
thread->name = name;
Expand Down

0 comments on commit 8a309c3

Please sign in to comment.