From 827f8ca3c77ad0b7e667c64b5c983b3b3ffe8d7d Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 27 Feb 2018 10:22:15 -0500 Subject: Kernel: Store the program id in the Process class instead of the CodeSet class. There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them. --- src/core/hle/kernel/process.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core/hle/kernel/process.h') 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 Create(std::string name, u64 program_id); + static SharedPtr 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> memory; @@ -97,7 +95,7 @@ private: class Process final : public Object { public: - static SharedPtr Create(std::string&& name); + static SharedPtr 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 resource_limit; -- cgit v1.2.3