mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
sys_ppu: Implement sys_ppu_thread_rename
This commit is contained in:
parent
e6e0210e73
commit
98e40d12ef
@ -224,16 +224,22 @@ public:
|
||||
}
|
||||
|
||||
// Set current thread name (not recommended)
|
||||
static void set_name(std::string_view name)
|
||||
static void set_name(std::string name)
|
||||
{
|
||||
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
|
||||
g_tls_this_thread->set_name(std::move(name));
|
||||
}
|
||||
|
||||
// Set thread name (not recommended)
|
||||
template <typename T>
|
||||
static void set_name(named_thread<T>& thread, std::string_view name)
|
||||
static void set_name(named_thread<T>& thread, std::string name)
|
||||
{
|
||||
static_cast<thread_base&>(thread).m_tname.store(make_single<std::string>(name));
|
||||
|
||||
if (g_tls_this_thread == std::addressof(static_cast<thread_base&>(thread)))
|
||||
{
|
||||
g_tls_this_thread->set_name(std::move(name));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -545,6 +545,8 @@ error_code sys_ppu_thread_rename(ppu_thread& ppu, u32 thread_id, vm::cptr<char>
|
||||
// thread_ctrl name is not changed (TODO)
|
||||
sys_ppu_thread.warning(u8"sys_ppu_thread_rename(): Thread renamed to “%s”", *_name);
|
||||
thread->ppu_tname.store(std::move(_name));
|
||||
thread_ctrl::set_name(*thread, thread->thread_name); // TODO: Currently sets debugger thread name only for local thread
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user