diff options
| author | 2017-09-26 18:17:47 -0500 | |
|---|---|---|
| committer | 2017-09-26 18:17:47 -0500 | |
| commit | 7f48aa8d2580da6b3b83a389e31804e493aba69f (patch) | |
| tree | 287b04f23f2d195f123fd15dca68d6a1cebf945c /src/core/loader/loader.h | |
| parent | Kernel/Thread: Allow specifying which process a thread belongs to when creati... (diff) | |
| download | yuzu-7f48aa8d2580da6b3b83a389e31804e493aba69f.tar.gz yuzu-7f48aa8d2580da6b3b83a389e31804e493aba69f.tar.xz yuzu-7f48aa8d2580da6b3b83a389e31804e493aba69f.zip | |
Loaders: Don't automatically set the current process every time we load an application.
The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table.
Diffstat (limited to 'src/core/loader/loader.h')
| -rw-r--r-- | src/core/loader/loader.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index 3160fd2fd..82b2be6a3 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h | |||
| @@ -13,10 +13,12 @@ | |||
| 13 | #include <boost/optional.hpp> | 13 | #include <boost/optional.hpp> |
| 14 | #include "common/common_types.h" | 14 | #include "common/common_types.h" |
| 15 | #include "common/file_util.h" | 15 | #include "common/file_util.h" |
| 16 | #include "core/hle/kernel/kernel.h" | ||
| 16 | 17 | ||
| 17 | namespace Kernel { | 18 | namespace Kernel { |
| 18 | struct AddressMapping; | 19 | struct AddressMapping; |
| 19 | } | 20 | class Process; |
| 21 | } // namespace Kernel | ||
| 20 | 22 | ||
| 21 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 23 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 22 | // Loader namespace | 24 | // Loader namespace |
| @@ -92,10 +94,11 @@ public: | |||
| 92 | virtual FileType GetFileType() = 0; | 94 | virtual FileType GetFileType() = 0; |
| 93 | 95 | ||
| 94 | /** | 96 | /** |
| 95 | * Load the application | 97 | * Load the application and return the created Process instance |
| 96 | * @return ResultStatus result of function | 98 | * @param process The newly created process. |
| 99 | * @return The status result of the operation. | ||
| 97 | */ | 100 | */ |
| 98 | virtual ResultStatus Load() = 0; | 101 | virtual ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) = 0; |
| 99 | 102 | ||
| 100 | /** | 103 | /** |
| 101 | * Loads the system mode that this application needs. | 104 | * Loads the system mode that this application needs. |
| @@ -206,4 +209,4 @@ extern const std::initializer_list<Kernel::AddressMapping> default_address_mappi | |||
| 206 | */ | 209 | */ |
| 207 | std::unique_ptr<AppLoader> GetLoader(const std::string& filename); | 210 | std::unique_ptr<AppLoader> GetLoader(const std::string& filename); |
| 208 | 211 | ||
| 209 | } // namespace | 212 | } // namespace Loader |