mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-06 20:39:19 +00:00
Better implementation of SetThreadCoreMask that allows changing the Core Mask (untested, no clue if it actually works)
This commit is contained in:
@@ -196,6 +196,28 @@ namespace Ryujinx.Core.OsHle.Handles
|
||||
Resume(Thread);
|
||||
}
|
||||
|
||||
public bool TryRunning(KThread Thread)
|
||||
{
|
||||
if (!AllThreads.TryGetValue(Thread, out SchedulerThread SchedThread))
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
lock (SchedLock)
|
||||
{
|
||||
if (WaitingToRun.HasThread(SchedThread) && AddActiveCore(Thread))
|
||||
{
|
||||
WaitingToRun.Remove(SchedThread);
|
||||
|
||||
RunThread(SchedThread);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume(KThread Thread)
|
||||
{
|
||||
if (!AllThreads.TryGetValue(Thread, out SchedulerThread SchedThread))
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Ryujinx.Core.OsHle.Handles
|
||||
public int ActualPriority { get; private set; }
|
||||
public int WantedPriority { get; private set; }
|
||||
|
||||
public int IdealCore { get; private set; }
|
||||
public int IdealCore { get; set; }
|
||||
public int ActualCore { get; set; }
|
||||
|
||||
public int WaitHandle { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user