aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/motion_input.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2020-08-02 10:57:08 -0700
committercomex <comexk@gmail.com>2020-08-05 20:34:49 -0700
commit23523e4c0a4d8abca01dd73ba8e705f6dd23c84d (patch)
tree20ebd140e8b07c86976e57a2cc2b38bfffacaedd /src/input_common/motion_input.cpp
parentf0be76a50a255affffb57cc828b6b59110da2376 (diff)
Fix thread naming on Linux, which limits names to 15 bytes.
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and do nothing. - Also, add logging in case `pthread_set_name_np` returns an error anyway. This is Linux-specific, as the Apple and BSD versions of `pthread_set_name_np return `void`. - Change the name for CPU threads in multi-core mode from "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it fits into the Linux limit. Some other thread names are also cut off, but I didn't bother addressing them as you can guess them from the truncated versions. For a CPU thread, truncation means you can't see which core it is!
Diffstat (limited to 'src/input_common/motion_input.cpp')
0 files changed, 0 insertions, 0 deletions