Rewrite scheduler context switch code (#1786)
* Rewrite scheduler context switch code * Fix race in UnmapIpcRestorePermission * Fix thread exit issue that could leave the scheduler in a invalid state * Change context switch method to not wait on guest thread, remove spin wait, use SignalAndWait to pass control * Remove multi-core setting (it is always on now) * Re-enable assert * Remove multicore from default config and schema * Fix race in KTimeManager
This commit is contained in:
parent
3484265d37
commit
48278905d1
37 changed files with 1080 additions and 1160 deletions
|
@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||
{
|
||||
public static bool UserToKernelInt32(KernelContext context, ulong address, out int value)
|
||||
{
|
||||
KProcess currentProcess = context.Scheduler.GetCurrentProcess();
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
if (currentProcess.CpuMemory.IsMapped(address) &&
|
||||
currentProcess.CpuMemory.IsMapped(address + 3))
|
||||
|
@ -25,7 +25,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||
|
||||
public static bool UserToKernelInt32Array(KernelContext context, ulong address, Span<int> values)
|
||||
{
|
||||
KProcess currentProcess = context.Scheduler.GetCurrentProcess();
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
for (int index = 0; index < values.Length; index++, address += 4)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||
|
||||
public static bool UserToKernelString(KernelContext context, ulong address, int size, out string value)
|
||||
{
|
||||
KProcess currentProcess = context.Scheduler.GetCurrentProcess();
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
if (currentProcess.CpuMemory.IsMapped(address) &&
|
||||
currentProcess.CpuMemory.IsMapped(address + (ulong)size - 1))
|
||||
|
@ -62,7 +62,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||
|
||||
public static bool KernelToUserInt32(KernelContext context, ulong address, int value)
|
||||
{
|
||||
KProcess currentProcess = context.Scheduler.GetCurrentProcess();
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
if (currentProcess.CpuMemory.IsMapped(address) &&
|
||||
currentProcess.CpuMemory.IsMapped(address + 3))
|
||||
|
@ -77,7 +77,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||
|
||||
public static bool KernelToUserInt64(KernelContext context, ulong address, long value)
|
||||
{
|
||||
KProcess currentProcess = context.Scheduler.GetCurrentProcess();
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
if (currentProcess.CpuMemory.IsMapped(address) &&
|
||||
currentProcess.CpuMemory.IsMapped(address + 7))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue