mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-02 22:17:13 +02:00
Thread scheduler rewrite (#393)
* Started to rewrite the thread scheduler * Add a single core-like scheduling mode, enabled by default * Clear exclusive monitor on context switch * Add SetThreadActivity, misc fixes * Implement WaitForAddress and SignalToAddress svcs, misc fixes * Misc fixes (on SetActivity and Arbiter), other tweaks * Rebased * Add missing null check * Rename multicore key on config, fix UpdatePriorityInheritance * Make scheduling data MLQs private * nit: Ordering
This commit is contained in:
parent
33e2810ef3
commit
b8133c1997
57 changed files with 3262 additions and 1540 deletions
|
@ -26,14 +26,14 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
public long GetCommonStateGetter(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ICommonStateGetter());
|
||||
MakeObject(Context, new ICommonStateGetter(Context.Device.System));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetSelfController(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ISelfController());
|
||||
MakeObject(Context, new ISelfController(Context.Device.System));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
private KEvent DisplayResolutionChangeEvent;
|
||||
|
||||
public ICommonStateGetter()
|
||||
public ICommonStateGetter(Horizon System)
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
{ 61, GetDefaultDisplayResolutionChangeEvent }
|
||||
};
|
||||
|
||||
DisplayResolutionChangeEvent = new KEvent();
|
||||
DisplayResolutionChangeEvent = new KEvent(System);
|
||||
}
|
||||
|
||||
public long GetEventHandle(ServiceCtx Context)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
private KEvent ChannelEvent;
|
||||
|
||||
public IHomeMenuFunctions()
|
||||
public IHomeMenuFunctions(Horizon System)
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
};
|
||||
|
||||
//ToDo: Signal this Event somewhere in future.
|
||||
ChannelEvent = new KEvent();
|
||||
ChannelEvent = new KEvent(System);
|
||||
}
|
||||
|
||||
public long RequestToGetForeground(ServiceCtx Context)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
private KEvent StateChangedEvent;
|
||||
|
||||
public ILibraryAppletAccessor()
|
||||
public ILibraryAppletAccessor(Horizon System)
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
|
@ -24,12 +24,12 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
{ 101, PopOutData }
|
||||
};
|
||||
|
||||
StateChangedEvent = new KEvent();
|
||||
StateChangedEvent = new KEvent(System);
|
||||
}
|
||||
|
||||
public long GetAppletStateChangedEvent(ServiceCtx Context)
|
||||
{
|
||||
StateChangedEvent.WaitEvent.Set();
|
||||
StateChangedEvent.Signal();
|
||||
|
||||
int Handle = Context.Process.HandleTable.OpenHandle(StateChangedEvent);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
public long CreateLibraryApplet(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ILibraryAppletAccessor());
|
||||
MakeObject(Context, new ILibraryAppletAccessor(Context.Device.System));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
private KEvent LaunchableEvent;
|
||||
|
||||
public ISelfController()
|
||||
public ISelfController(Horizon System)
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
{ 50, SetHandlesRequestToDisplay }
|
||||
};
|
||||
|
||||
LaunchableEvent = new KEvent();
|
||||
LaunchableEvent = new KEvent(System);
|
||||
}
|
||||
|
||||
public long Exit(ServiceCtx Context)
|
||||
|
@ -57,7 +57,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
public long GetLibraryAppletLaunchableEvent(ServiceCtx Context)
|
||||
{
|
||||
LaunchableEvent.WaitEvent.Set();
|
||||
LaunchableEvent.Signal();
|
||||
|
||||
int Handle = Context.Process.HandleTable.OpenHandle(LaunchableEvent);
|
||||
|
||||
|
|
|
@ -28,14 +28,14 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
public long GetCommonStateGetter(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ICommonStateGetter());
|
||||
MakeObject(Context, new ICommonStateGetter(Context.Device.System));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetSelfController(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new ISelfController());
|
||||
MakeObject(Context, new ISelfController(Context.Device.System));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
|||
|
||||
public long GetHomeMenuFunctions(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IHomeMenuFunctions());
|
||||
MakeObject(Context, new IHomeMenuFunctions(Context.Device.System));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue