[Base] Cleanup set thread name.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2014 Ben Vanik. All rights reserved. *
|
||||
* Copyright 2020 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
@@ -32,13 +32,12 @@ uint32_t current_thread_system_id() {
|
||||
return static_cast<uint32_t>(syscall(SYS_gettid));
|
||||
}
|
||||
|
||||
void set_name(const std::string& name) {
|
||||
pthread_setname_np(pthread_self(), name.c_str());
|
||||
void set_name(std::thread::native_handle_type handle,
|
||||
const std::string_view name) {
|
||||
pthread_setname_np(handle, std::string(name).c_str());
|
||||
}
|
||||
|
||||
void set_name(std::thread::native_handle_type handle, const std::string& name) {
|
||||
pthread_setname_np(handle, name.c_str());
|
||||
}
|
||||
void set_name(const std::string_view name) { set_name(pthread_self(), name); }
|
||||
|
||||
void MaybeYield() {
|
||||
pthread_yield();
|
||||
|
||||
Reference in New Issue
Block a user