This commit is contained in:
emmauss
2018-04-05 01:16:59 +03:00
committed by gdkchan
parent e16ca561cb
commit 836a003c8e
8 changed files with 59 additions and 4 deletions

View File

@@ -40,6 +40,7 @@ namespace Ryujinx.Core.OsHle.Svc
{ 0x0c, SvcGetThreadPriority },
{ 0x0d, SvcSetThreadPriority },
{ 0x0f, SvcSetThreadCoreMask },
{ 0x10, SvcGetCurrentProcessorNumber },
{ 0x12, SvcClearEvent },
{ 0x13, SvcMapSharedMemory },
{ 0x14, SvcUnmapSharedMemory },

View File

@@ -117,6 +117,13 @@ namespace Ryujinx.Core.OsHle.Svc
//TODO: Error codes.
}
private void SvcGetCurrentProcessorNumber(AThreadState ThreadState)
{
KThread CurrThread = Process.GetThread(ThreadState.Tpidr);
ThreadState.X0 = (ulong)CurrThread.ProcessorId;
}
private void SvcGetThreadId(AThreadState ThreadState)
{
int Handle = (int)ThreadState.X1;