Better implementation of SetThreadCoreMask that allows changing the Core Mask (untested, no clue if it actually works)
This commit is contained in:
parent
4546d1b9be
commit
b2b1d7dcd7
4 changed files with 109 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue