mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
Interpret (PthreadT)-1 as current thread in posix_pthread_setaffinity_np
This commit is contained in:
parent
e2513d50be
commit
e090a5f0d7
@ -585,6 +585,9 @@ int PS4_SYSV_ABI posix_pthread_setaffinity_np(PthreadT thread, size_t cpusetsize
|
||||
if (thread == nullptr || cpusetp == nullptr) {
|
||||
return POSIX_EINVAL;
|
||||
}
|
||||
if (thread == reinterpret_cast<PthreadT>(-1)) {
|
||||
thread = posix_pthread_self();
|
||||
}
|
||||
auto* attr_ptr = &thread->attr;
|
||||
if (const auto ret = posix_pthread_attr_setaffinity_np(&attr_ptr, cpusetsize, cpusetp)) {
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user