misc: chore: convert split ThreadStatic fields & property getter/setters into a single property with [field: ThreadStatic]
This commit is contained in:
parent
5ab50680b4
commit
d8549f687b
@ -17,27 +17,21 @@ namespace Ryujinx.Horizon
|
|||||||
}.Start();
|
}.Start();
|
||||||
|
|
||||||
public static event Action<MessagePackObject> PlayReport;
|
public static event Action<MessagePackObject> PlayReport;
|
||||||
|
|
||||||
[ThreadStatic]
|
|
||||||
private static HorizonOptions _options;
|
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static ISyscallApi _syscall;
|
public static HorizonOptions Options { get; private set; }
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static IVirtualMemoryManager _addressSpace;
|
public static ISyscallApi Syscall { get; private set; }
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static IThreadContext _threadContext;
|
public static IVirtualMemoryManager AddressSpace { get; private set; }
|
||||||
|
|
||||||
[ThreadStatic]
|
[field: ThreadStatic]
|
||||||
private static int _threadHandle;
|
public static IThreadContext ThreadContext { get; private set; }
|
||||||
|
|
||||||
public static HorizonOptions Options => _options;
|
[field: ThreadStatic]
|
||||||
public static ISyscallApi Syscall => _syscall;
|
public static int CurrentThreadHandle { get; private set; }
|
||||||
public static IVirtualMemoryManager AddressSpace => _addressSpace;
|
|
||||||
public static IThreadContext ThreadContext => _threadContext;
|
|
||||||
public static int CurrentThreadHandle => _threadHandle;
|
|
||||||
|
|
||||||
public static void Register(
|
public static void Register(
|
||||||
HorizonOptions options,
|
HorizonOptions options,
|
||||||
@ -46,11 +40,11 @@ namespace Ryujinx.Horizon
|
|||||||
IThreadContext threadContext,
|
IThreadContext threadContext,
|
||||||
int threadHandle)
|
int threadHandle)
|
||||||
{
|
{
|
||||||
_options = options;
|
Options = options;
|
||||||
_syscall = syscallApi;
|
Syscall = syscallApi;
|
||||||
_addressSpace = addressSpace;
|
AddressSpace = addressSpace;
|
||||||
_threadContext = threadContext;
|
ThreadContext = threadContext;
|
||||||
_threadHandle = threadHandle;
|
CurrentThreadHandle = threadHandle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user