core/core: Move process execution start to System's Load()
This gives us significantly more control over where in the initialization process we start execution of the main process. Previously we were running the main process before the CPU or GPU threads were initialized (not good). This amends execution to start after all of our threads are properly set up.
This commit is contained in:
parent
32a6ceb4e5
commit
612e1388df
20 changed files with 144 additions and 107 deletions
|
@ -131,6 +131,12 @@ std::ostream& operator<<(std::ostream& os, ResultStatus status);
|
|||
/// Interface for loading an application
|
||||
class AppLoader : NonCopyable {
|
||||
public:
|
||||
struct LoadParameters {
|
||||
s32 main_thread_priority;
|
||||
u64 main_thread_stack_size;
|
||||
};
|
||||
using LoadResult = std::pair<ResultStatus, std::optional<LoadParameters>>;
|
||||
|
||||
explicit AppLoader(FileSys::VirtualFile file);
|
||||
virtual ~AppLoader();
|
||||
|
||||
|
@ -145,7 +151,7 @@ public:
|
|||
* @param process The newly created process.
|
||||
* @return The status result of the operation.
|
||||
*/
|
||||
virtual ResultStatus Load(Kernel::Process& process) = 0;
|
||||
virtual LoadResult Load(Kernel::Process& process) = 0;
|
||||
|
||||
/**
|
||||
* Loads the system mode that this application needs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue