From 9046d4a5485452802b756869b7d27056ba9ea9d7 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 24 Nov 2019 20:15:51 -0500 Subject: kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154) * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details. --- src/core/hle/kernel/process.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 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 e2eda26b9..3483fa19d 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -62,6 +62,9 @@ enum class ProcessStatus { class Process final : public WaitObject { public: + explicit Process(Core::System& system); + ~Process() override; + enum : u64 { /// Lowest allowed process ID for a kernel initial process. InitialKIPIDMin = 1, @@ -82,7 +85,8 @@ public: static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4; - static SharedPtr Create(Core::System& system, std::string name, ProcessType type); + static std::shared_ptr Create(Core::System& system, std::string name, + ProcessType type); std::string GetTypeName() const override { return "Process"; @@ -157,7 +161,7 @@ public: } /// Gets the resource limit descriptor for this process - SharedPtr GetResourceLimit() const; + std::shared_ptr GetResourceLimit() const; /// Gets the ideal CPU core ID for this process u8 GetIdealCore() const { @@ -234,13 +238,13 @@ public: } /// Insert a thread into the condition variable wait container - void InsertConditionVariableThread(SharedPtr thread); + void InsertConditionVariableThread(std::shared_ptr thread); /// Remove a thread from the condition variable wait container - void RemoveConditionVariableThread(SharedPtr thread); + void RemoveConditionVariableThread(std::shared_ptr thread); /// Obtain all condition variable threads waiting for some address - std::vector> GetConditionVariableThreads(VAddr cond_var_addr); + std::vector> GetConditionVariableThreads(VAddr cond_var_addr); /// Registers a thread as being created under this process, /// adding it to this process' thread list. @@ -297,9 +301,6 @@ public: void FreeTLSRegion(VAddr tls_address); private: - explicit Process(Core::System& system); - ~Process() override; - /// Checks if the specified thread should wait until this process is available. bool ShouldWait(const Thread* thread) const override; @@ -338,7 +339,7 @@ private: u32 system_resource_size = 0; /// Resource limit descriptor for this process - SharedPtr resource_limit; + std::shared_ptr resource_limit; /// The ideal CPU core for this process, threads are scheduled on this core by default. u8 ideal_core = 0; @@ -386,7 +387,7 @@ private: std::list thread_list; /// List of threads waiting for a condition variable - std::unordered_map>> cond_var_threads; + std::unordered_map>> cond_var_threads; /// System context Core::System& system; -- cgit v1.2.3