diff options
Diffstat (limited to 'src/core/hle/kernel/process.h')
| -rw-r--r-- | src/core/hle/kernel/process.h | 21 |
1 files changed, 11 insertions, 10 deletions
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 { | |||
| 62 | 62 | ||
| 63 | class Process final : public WaitObject { | 63 | class Process final : public WaitObject { |
| 64 | public: | 64 | public: |
| 65 | explicit Process(Core::System& system); | ||
| 66 | ~Process() override; | ||
| 67 | |||
| 65 | enum : u64 { | 68 | enum : u64 { |
| 66 | /// Lowest allowed process ID for a kernel initial process. | 69 | /// Lowest allowed process ID for a kernel initial process. |
| 67 | InitialKIPIDMin = 1, | 70 | InitialKIPIDMin = 1, |
| @@ -82,7 +85,8 @@ public: | |||
| 82 | 85 | ||
| 83 | static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4; | 86 | static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4; |
| 84 | 87 | ||
| 85 | static SharedPtr<Process> Create(Core::System& system, std::string name, ProcessType type); | 88 | static std::shared_ptr<Process> Create(Core::System& system, std::string name, |
| 89 | ProcessType type); | ||
| 86 | 90 | ||
| 87 | std::string GetTypeName() const override { | 91 | std::string GetTypeName() const override { |
| 88 | return "Process"; | 92 | return "Process"; |
| @@ -157,7 +161,7 @@ public: | |||
| 157 | } | 161 | } |
| 158 | 162 | ||
| 159 | /// Gets the resource limit descriptor for this process | 163 | /// Gets the resource limit descriptor for this process |
| 160 | SharedPtr<ResourceLimit> GetResourceLimit() const; | 164 | std::shared_ptr<ResourceLimit> GetResourceLimit() const; |
| 161 | 165 | ||
| 162 | /// Gets the ideal CPU core ID for this process | 166 | /// Gets the ideal CPU core ID for this process |
| 163 | u8 GetIdealCore() const { | 167 | u8 GetIdealCore() const { |
| @@ -234,13 +238,13 @@ public: | |||
| 234 | } | 238 | } |
| 235 | 239 | ||
| 236 | /// Insert a thread into the condition variable wait container | 240 | /// Insert a thread into the condition variable wait container |
| 237 | void InsertConditionVariableThread(SharedPtr<Thread> thread); | 241 | void InsertConditionVariableThread(std::shared_ptr<Thread> thread); |
| 238 | 242 | ||
| 239 | /// Remove a thread from the condition variable wait container | 243 | /// Remove a thread from the condition variable wait container |
| 240 | void RemoveConditionVariableThread(SharedPtr<Thread> thread); | 244 | void RemoveConditionVariableThread(std::shared_ptr<Thread> thread); |
| 241 | 245 | ||
| 242 | /// Obtain all condition variable threads waiting for some address | 246 | /// Obtain all condition variable threads waiting for some address |
| 243 | std::vector<SharedPtr<Thread>> GetConditionVariableThreads(VAddr cond_var_addr); | 247 | std::vector<std::shared_ptr<Thread>> GetConditionVariableThreads(VAddr cond_var_addr); |
| 244 | 248 | ||
| 245 | /// Registers a thread as being created under this process, | 249 | /// Registers a thread as being created under this process, |
| 246 | /// adding it to this process' thread list. | 250 | /// adding it to this process' thread list. |
| @@ -297,9 +301,6 @@ public: | |||
| 297 | void FreeTLSRegion(VAddr tls_address); | 301 | void FreeTLSRegion(VAddr tls_address); |
| 298 | 302 | ||
| 299 | private: | 303 | private: |
| 300 | explicit Process(Core::System& system); | ||
| 301 | ~Process() override; | ||
| 302 | |||
| 303 | /// Checks if the specified thread should wait until this process is available. | 304 | /// Checks if the specified thread should wait until this process is available. |
| 304 | bool ShouldWait(const Thread* thread) const override; | 305 | bool ShouldWait(const Thread* thread) const override; |
| 305 | 306 | ||
| @@ -338,7 +339,7 @@ private: | |||
| 338 | u32 system_resource_size = 0; | 339 | u32 system_resource_size = 0; |
| 339 | 340 | ||
| 340 | /// Resource limit descriptor for this process | 341 | /// Resource limit descriptor for this process |
| 341 | SharedPtr<ResourceLimit> resource_limit; | 342 | std::shared_ptr<ResourceLimit> resource_limit; |
| 342 | 343 | ||
| 343 | /// The ideal CPU core for this process, threads are scheduled on this core by default. | 344 | /// The ideal CPU core for this process, threads are scheduled on this core by default. |
| 344 | u8 ideal_core = 0; | 345 | u8 ideal_core = 0; |
| @@ -386,7 +387,7 @@ private: | |||
| 386 | std::list<const Thread*> thread_list; | 387 | std::list<const Thread*> thread_list; |
| 387 | 388 | ||
| 388 | /// List of threads waiting for a condition variable | 389 | /// List of threads waiting for a condition variable |
| 389 | std::unordered_map<VAddr, std::list<SharedPtr<Thread>>> cond_var_threads; | 390 | std::unordered_map<VAddr, std::list<std::shared_ptr<Thread>>> cond_var_threads; |
| 390 | 391 | ||
| 391 | /// System context | 392 | /// System context |
| 392 | Core::System& system; | 393 | Core::System& system; |