Implement many objects, improve logging. (#42)
* Implement many objects, improve logging. Change and rename folders of Services Add Logging of IpcMessage. Add "lm" Log Service. Parse Errors of SetTerminateResult Add Svc Calls. Add many object implementations. * Corrections Forgotten Debug Conf * Corrections 2 * Corrections 3 * Corrections 4
This commit is contained in:
@@ -30,6 +30,8 @@ namespace Ryujinx.Core.OsHle.Svc
|
||||
{ 0x09, SvcStartThread },
|
||||
{ 0x0b, SvcSleepThread },
|
||||
{ 0x0c, SvcGetThreadPriority },
|
||||
{ 0x0d, SvcSetThreadPriority },
|
||||
{ 0x0f, SvcSetThreadCoreMask },
|
||||
{ 0x13, SvcMapSharedMemory },
|
||||
{ 0x14, SvcUnmapSharedMemory },
|
||||
{ 0x15, SvcCreateTransferMemory },
|
||||
@@ -44,6 +46,7 @@ namespace Ryujinx.Core.OsHle.Svc
|
||||
{ 0x1f, SvcConnectToNamedPort },
|
||||
{ 0x21, SvcSendSyncRequest },
|
||||
{ 0x22, SvcSendSyncRequestWithUserBuffer },
|
||||
{ 0x25, SvcGetThreadId },
|
||||
{ 0x26, SvcBreak },
|
||||
{ 0x27, SvcOutputDebugString },
|
||||
{ 0x29, SvcGetInfo }
|
||||
|
||||
@@ -81,5 +81,44 @@ namespace Ryujinx.Core.OsHle.Svc
|
||||
|
||||
//TODO: Error codes.
|
||||
}
|
||||
|
||||
private void SvcSetThreadPriority(AThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X1;
|
||||
int Prio = (int)ThreadState.X0;
|
||||
|
||||
HThread Thread = Ns.Os.Handles.GetData<HThread>(Handle);
|
||||
|
||||
if (Thread != null)
|
||||
{
|
||||
Thread.Priority = Prio;
|
||||
|
||||
ThreadState.X0 = (int)SvcResult.Success;
|
||||
}
|
||||
|
||||
//TODO: Error codes.
|
||||
}
|
||||
|
||||
private void SvcSetThreadCoreMask(AThreadState ThreadState)
|
||||
{
|
||||
ThreadState.X0 = (int)SvcResult.Success;
|
||||
|
||||
//TODO: Error codes.
|
||||
}
|
||||
|
||||
private void SvcGetThreadId(AThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X0;
|
||||
|
||||
HThread Thread = Ns.Os.Handles.GetData<HThread>(Handle);
|
||||
|
||||
if (Thread != null)
|
||||
{
|
||||
ThreadState.X1 = (ulong)Thread.ThreadId;
|
||||
ThreadState.X0 = (int)SvcResult.Success;
|
||||
}
|
||||
|
||||
//TODO: Error codes.
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user