diff options
author | gdkchan <gab.dark.100@gmail.com> | 2020-05-04 00:41:29 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 13:41:29 +1000 |
commit | 15d1cc806b1b978bab83d8bb426a124d9f0f788c (patch) | |
tree | 4fd10fdd11412bafcf3022e7cc4eb21179eef1b1 /Ryujinx.HLE/HOS/Kernel/Common/KernelTransfer.cs | |
parent | cd48576f5846aa89a36bfc833e9de5dde9627aed (diff) |
Move kernel state out of the Horizon class (#1107)
* Move kernel state from Horizon to KernelContext
* Merge syscalls partial classes, split 32 and 64-bit variants
* Sort usings
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/Common/KernelTransfer.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/Common/KernelTransfer.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/Common/KernelTransfer.cs b/Ryujinx.HLE/HOS/Kernel/Common/KernelTransfer.cs index cd8d6661..8b739f66 100644 --- a/Ryujinx.HLE/HOS/Kernel/Common/KernelTransfer.cs +++ b/Ryujinx.HLE/HOS/Kernel/Common/KernelTransfer.cs @@ -5,9 +5,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Common { static class KernelTransfer { - public static bool UserToKernelInt32(Horizon system, ulong address, out int value) + public static bool UserToKernelInt32(KernelContext context, ulong address, out int value) { - KProcess currentProcess = system.Scheduler.GetCurrentProcess(); + KProcess currentProcess = context.Scheduler.GetCurrentProcess(); if (currentProcess.CpuMemory.IsMapped(address) && currentProcess.CpuMemory.IsMapped(address + 3)) @@ -22,9 +22,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Common return false; } - public static bool UserToKernelInt32Array(Horizon system, ulong address, int[] values) + public static bool UserToKernelInt32Array(KernelContext context, ulong address, int[] values) { - KProcess currentProcess = system.Scheduler.GetCurrentProcess(); + KProcess currentProcess = context.Scheduler.GetCurrentProcess(); for (int index = 0; index < values.Length; index++, address += 4) { @@ -42,9 +42,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Common return true; } - public static bool UserToKernelString(Horizon system, ulong address, int size, out string value) + public static bool UserToKernelString(KernelContext context, ulong address, int size, out string value) { - KProcess currentProcess = system.Scheduler.GetCurrentProcess(); + KProcess currentProcess = context.Scheduler.GetCurrentProcess(); if (currentProcess.CpuMemory.IsMapped(address) && currentProcess.CpuMemory.IsMapped(address + (ulong)size - 1)) @@ -59,9 +59,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Common return false; } - public static bool KernelToUserInt32(Horizon system, ulong address, int value) + public static bool KernelToUserInt32(KernelContext context, ulong address, int value) { - KProcess currentProcess = system.Scheduler.GetCurrentProcess(); + KProcess currentProcess = context.Scheduler.GetCurrentProcess(); if (currentProcess.CpuMemory.IsMapped(address) && currentProcess.CpuMemory.IsMapped(address + 3)) @@ -74,9 +74,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Common return false; } - public static bool KernelToUserInt64(Horizon system, ulong address, long value) + public static bool KernelToUserInt64(KernelContext context, ulong address, long value) { - KProcess currentProcess = system.Scheduler.GetCurrentProcess(); + KProcess currentProcess = context.Scheduler.GetCurrentProcess(); if (currentProcess.CpuMemory.IsMapped(address) && currentProcess.CpuMemory.IsMapped(address + 7)) |