2023-01-04 22:15:45 +00:00
|
|
|
|
using Ryujinx.Horizon.Common;
|
|
|
|
|
using Ryujinx.Memory;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.Horizon
|
|
|
|
|
{
|
2023-09-14 07:50:19 +00:00
|
|
|
|
public static class HorizonStatic
|
2023-01-04 22:15:45 +00:00
|
|
|
|
{
|
|
|
|
|
[ThreadStatic]
|
|
|
|
|
private static HorizonOptions _options;
|
|
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
|
private static ISyscallApi _syscall;
|
|
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
|
private static IVirtualMemoryManager _addressSpace;
|
|
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
|
private static IThreadContext _threadContext;
|
|
|
|
|
|
|
|
|
|
[ThreadStatic]
|
|
|
|
|
private static int _threadHandle;
|
|
|
|
|
|
2023-07-01 10:42:10 +00:00
|
|
|
|
public static HorizonOptions Options => _options;
|
|
|
|
|
public static ISyscallApi Syscall => _syscall;
|
|
|
|
|
public static IVirtualMemoryManager AddressSpace => _addressSpace;
|
|
|
|
|
public static IThreadContext ThreadContext => _threadContext;
|
|
|
|
|
public static int CurrentThreadHandle => _threadHandle;
|
2023-01-04 22:15:45 +00:00
|
|
|
|
|
|
|
|
|
public static void Register(
|
2023-07-01 10:42:10 +00:00
|
|
|
|
HorizonOptions options,
|
|
|
|
|
ISyscallApi syscallApi,
|
2023-01-04 22:15:45 +00:00
|
|
|
|
IVirtualMemoryManager addressSpace,
|
2023-07-01 10:42:10 +00:00
|
|
|
|
IThreadContext threadContext,
|
|
|
|
|
int threadHandle)
|
2023-01-04 22:15:45 +00:00
|
|
|
|
{
|
2023-07-01 10:42:10 +00:00
|
|
|
|
_options = options;
|
|
|
|
|
_syscall = syscallApi;
|
|
|
|
|
_addressSpace = addressSpace;
|
2023-01-04 22:15:45 +00:00
|
|
|
|
_threadContext = threadContext;
|
2023-07-01 10:42:10 +00:00
|
|
|
|
_threadHandle = threadHandle;
|
2023-01-04 22:15:45 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|