mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-13 04:37:02 +00:00
Sync thread name on Schedule
After commit 51ca73cb, using a non-blocking socket (e.g. poll(..., timeout=0)) will still result in a blocking socket.
It appears the above commit inverted the behavior.
This merge request fixes the blocking flag: blocking will be set to false when the flag is 0x800.
This commit is contained in:
parent
c0b7452cb5
commit
0b5f312b20
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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
||||||
|
|
||||||
public ulong ThreadUid { get; private set; }
|
public ulong ThreadUid { get; private set; }
|
||||||
|
|
||||||
|
public bool IsThreadNamed { get; set; }
|
||||||
|
|
||||||
private long _totalTimeRunning;
|
private long _totalTimeRunning;
|
||||||
|
|
||||||
public long TotalTimeRunning => _totalTimeRunning;
|
public long TotalTimeRunning => _totalTimeRunning;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue