Skip to content

Commit

Permalink
Check thread param on posix_pthread_rename_np
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMiller123 committed Jan 12, 2025
1 parent 62bbad6 commit a01c912
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 a01c912

Please sign in to comment.