Allow more than one process, free resources on process dispose, implement SvcExitThread
This commit is contained in:
parent
3aaa4717b6
commit
7a27990faa
46 changed files with 926 additions and 598 deletions
|
@ -39,7 +39,7 @@ namespace Ryujinx.Core.OsHle.Svc
|
|||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
|
||||
HThread Thread = Ns.Os.Handles.GetData<HThread>(Handle);
|
||||
HThread Thread = Process.HandleTable.GetData<HThread>(Handle);
|
||||
|
||||
if (Thread != null)
|
||||
{
|
||||
|
@ -51,6 +51,13 @@ namespace Ryujinx.Core.OsHle.Svc
|
|||
//TODO: Error codes.
|
||||
}
|
||||
|
||||
private void SvcExitThread(AThreadState ThreadState)
|
||||
{
|
||||
HThread CurrThread = Process.GetThread(ThreadState.Tpidr);
|
||||
|
||||
CurrThread.Thread.StopExecution();
|
||||
}
|
||||
|
||||
private void SvcSleepThread(AThreadState ThreadState)
|
||||
{
|
||||
ulong NanoSecs = ThreadState.X0;
|
||||
|
@ -71,7 +78,7 @@ namespace Ryujinx.Core.OsHle.Svc
|
|||
{
|
||||
int Handle = (int)ThreadState.X1;
|
||||
|
||||
HThread Thread = Ns.Os.Handles.GetData<HThread>(Handle);
|
||||
HThread Thread = Process.HandleTable.GetData<HThread>(Handle);
|
||||
|
||||
if (Thread != null)
|
||||
{
|
||||
|
@ -87,7 +94,7 @@ namespace Ryujinx.Core.OsHle.Svc
|
|||
int Handle = (int)ThreadState.X1;
|
||||
int Prio = (int)ThreadState.X0;
|
||||
|
||||
HThread Thread = Ns.Os.Handles.GetData<HThread>(Handle);
|
||||
HThread Thread = Process.HandleTable.GetData<HThread>(Handle);
|
||||
|
||||
if (Thread != null)
|
||||
{
|
||||
|
@ -110,7 +117,7 @@ namespace Ryujinx.Core.OsHle.Svc
|
|||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
|
||||
HThread Thread = Ns.Os.Handles.GetData<HThread>(Handle);
|
||||
HThread Thread = Process.HandleTable.GetData<HThread>(Handle);
|
||||
|
||||
if (Thread != null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue