2023-01-04 17:15:45 -05:00
|
|
|
|
using Ryujinx.Horizon.Common;
|
|
|
|
|
using Ryujinx.Memory;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.Horizon
|
|
|
|
|
{
|
|
|
|
|
static class HorizonStatic
|
|
|
|
|
{
|
|
|
|
|
[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-01-08 07:13:39 -05: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 17:15:45 -05:00
|
|
|
|
|
|
|
|
|
public static void Register(
|
2023-01-08 07:13:39 -05:00
|
|
|
|
HorizonOptions options,
|
|
|
|
|
ISyscallApi syscallApi,
|
2023-01-04 17:15:45 -05:00
|
|
|
|
IVirtualMemoryManager addressSpace,
|
2023-01-08 07:13:39 -05:00
|
|
|
|
IThreadContext threadContext,
|
|
|
|
|
int threadHandle)
|
2023-01-04 17:15:45 -05:00
|
|
|
|
{
|
2023-01-08 07:13:39 -05:00
|
|
|
|
_options = options;
|
|
|
|
|
_syscall = syscallApi;
|
|
|
|
|
_addressSpace = addressSpace;
|
2023-01-04 17:15:45 -05:00
|
|
|
|
_threadContext = threadContext;
|
2023-01-08 07:13:39 -05:00
|
|
|
|
_threadHandle = threadHandle;
|
2023-01-04 17:15:45 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|