mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-14 07:37:04 +00:00
Sync thread name on Schedule
Set the name of the HostThread on Schedule() if the thread name isn't already set and if we fetch a valid thread name from the guest thread.
This commit is contained in:
parent
1ef09717d2
commit
c6230fc02e
2 changed files with 8 additions and 0 deletions
|
|
@ -296,6 +296,12 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
||||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||||
KThread selectedThread = _state.SelectedThread;
|
KThread selectedThread = _state.SelectedThread;
|
||||||
|
|
||||||
|
if (!currentThread.IsThreadNamed && currentThread.GetThreadName() != "")
|
||||||
|
{
|
||||||
|
currentThread.HostThread.Name = $"<{currentThread.GetThreadName()}>";
|
||||||
|
currentThread.IsThreadNamed = true;
|
||||||
|
}
|
||||||
|
|
||||||
// If the thread is already scheduled and running on the core, we have nothing to do.
|
// If the thread is already scheduled and running on the core, we have nothing to do.
|
||||||
if (currentThread == selectedThread)
|
if (currentThread == selectedThread)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
||||||
public ulong AffinityMask { get; set; }
|
public ulong AffinityMask { get; set; }
|
||||||
|
|
||||||
public ulong ThreadUid { get; private set; }
|
public ulong ThreadUid { get; private set; }
|
||||||
|
|
||||||
|
public bool IsThreadNamed { get; set; }
|
||||||
|
|
||||||
private long _totalTimeRunning;
|
private long _totalTimeRunning;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue