mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 15:00:48 -07:00
Better process implementation (#491)
* Initial implementation of KProcess * Some improvements to the memory manager, implement back guest stack trace printing * Better GetInfo implementation, improve checking in some places with information from process capabilities * Allow the cpu to read/write from the correct memory locations for accesses crossing a page boundary * Change long -> ulong for address/size on memory related methods to avoid unnecessary casts * Attempt at implementing ldr:ro with new KProcess * Allow BSS with size 0 on ldr:ro * Add checking for memory block slab heap usage, return errors if full, exit gracefully * Use KMemoryBlockSize const from KMemoryManager * Allow all methods to read from non-contiguous locations * Fix for TransactParcelAuto * Address PR feedback, additionally fix some small issues related to the KIP loader and implement SVCs GetProcessId, GetProcessList, GetSystemInfo, CreatePort and ManageNamedPort * Fix wrong check for source pages count from page list on MapPhysicalMemory * Fix some issues with UnloadNro on ldr:ro
This commit is contained in:
@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
||||
|
||||
public bool MultiCoreScheduling { get; set; }
|
||||
|
||||
private HleCoreManager CoreManager;
|
||||
public HleCoreManager CoreManager { get; private set; }
|
||||
|
||||
private bool KeepPreempting;
|
||||
|
||||
@ -49,11 +49,11 @@ namespace Ryujinx.HLE.HOS.Kernel
|
||||
|
||||
if (SelectedCount == 0)
|
||||
{
|
||||
CoreManager.GetThread(Thread.CurrentThread).Reset();
|
||||
CoreManager.Reset(Thread.CurrentThread);
|
||||
}
|
||||
else if (SelectedCount == 1)
|
||||
{
|
||||
CoreManager.GetThread(Thread.CurrentThread).Set();
|
||||
CoreManager.Set(Thread.CurrentThread);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -77,7 +77,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
||||
return;
|
||||
}
|
||||
|
||||
CoreManager.GetThread(CurrentThread.Context.Work).Reset();
|
||||
CoreManager.Reset(CurrentThread.Context.Work);
|
||||
}
|
||||
|
||||
//Advance current core and try picking a thread,
|
||||
@ -94,7 +94,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
||||
{
|
||||
CoreContext.CurrentThread.ClearExclusive();
|
||||
|
||||
CoreManager.GetThread(CoreContext.CurrentThread.Context.Work).Set();
|
||||
CoreManager.Set(CoreContext.CurrentThread.Context.Work);
|
||||
|
||||
CoreContext.CurrentThread.Context.Execute();
|
||||
|
||||
@ -111,7 +111,7 @@ namespace Ryujinx.HLE.HOS.Kernel
|
||||
}
|
||||
}
|
||||
|
||||
CoreManager.GetThread(Thread.CurrentThread).WaitOne();
|
||||
CoreManager.Wait(Thread.CurrentThread);
|
||||
}
|
||||
|
||||
private void PreemptCurrentThread()
|
||||
@ -134,11 +134,11 @@ namespace Ryujinx.HLE.HOS.Kernel
|
||||
}
|
||||
}
|
||||
|
||||
public void StopThread(KThread Thread)
|
||||
public void ExitThread(KThread Thread)
|
||||
{
|
||||
Thread.Context.StopExecution();
|
||||
|
||||
CoreManager.GetThread(Thread.Context.Work).Set();
|
||||
CoreManager.Exit(Thread.Context.Work);
|
||||
}
|
||||
|
||||
public void RemoveThread(KThread Thread)
|
||||
|
Reference in New Issue
Block a user