diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-02 04:14:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 04:14:31 +0100 |
commit | 46fc7d85023f4449b542f0c58830421d667f92b7 (patch) | |
tree | a605aabd8c776bebea1111fccd8df01d569d5170 /src/core/hle/kernel | |
parent | Merge pull request #224 from Armada651/clear-process (diff) | |
parent | SaveData: Use the current titleid when opening the savedata archive. (diff) | |
download | yuzu-46fc7d85023f4449b542f0c58830421d667f92b7.tar yuzu-46fc7d85023f4449b542f0c58830421d667f92b7.tar.gz yuzu-46fc7d85023f4449b542f0c58830421d667f92b7.tar.bz2 yuzu-46fc7d85023f4449b542f0c58830421d667f92b7.tar.lz yuzu-46fc7d85023f4449b542f0c58830421d667f92b7.tar.xz yuzu-46fc7d85023f4449b542f0c58830421d667f92b7.tar.zst yuzu-46fc7d85023f4449b542f0c58830421d667f92b7.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/kernel/process.h | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 8e74059ea..bb6dc28d7 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -20,12 +20,9 @@ namespace Kernel { // Lists all processes that exist in the current session. static std::vector<SharedPtr<Process>> process_list; -SharedPtr<CodeSet> CodeSet::Create(std::string name, u64 program_id) { +SharedPtr<CodeSet> CodeSet::Create(std::string name) { SharedPtr<CodeSet> codeset(new CodeSet); - codeset->name = std::move(name); - codeset->program_id = program_id; - return codeset; } @@ -34,13 +31,14 @@ CodeSet::~CodeSet() {} u32 Process::next_process_id; -SharedPtr<Process> Process::Create(std::string&& name) { +SharedPtr<Process> Process::Create(std::string&& name, u64 program_id) { SharedPtr<Process> process(new Process); process->name = std::move(name); process->flags.raw = 0; process->flags.memory_region.Assign(MemoryRegion::APPLICATION); process->status = ProcessStatus::Created; + process->program_id = program_id; process_list.push_back(process); return process; diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index add98472f..1de12efd3 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -56,7 +56,7 @@ class ResourceLimit; struct MemoryRegionInfo; struct CodeSet final : public Object { - static SharedPtr<CodeSet> Create(std::string name, u64 program_id); + static SharedPtr<CodeSet> Create(std::string name); std::string GetTypeName() const override { return "CodeSet"; @@ -72,8 +72,6 @@ struct CodeSet final : public Object { /// Name of the process std::string name; - /// Title ID corresponding to the process - u64 program_id; std::shared_ptr<std::vector<u8>> memory; @@ -97,7 +95,7 @@ private: class Process final : public Object { public: - static SharedPtr<Process> Create(std::string&& name); + static SharedPtr<Process> Create(std::string&& name, u64 program_id); std::string GetTypeName() const override { return "Process"; @@ -113,6 +111,9 @@ public: static u32 next_process_id; + /// Title ID corresponding to the process + u64 program_id; + /// Resource limit descriptor for this process SharedPtr<ResourceLimit> resource_limit; |