diff options
| author | 2018-12-21 13:45:27 -0500 | |
|---|---|---|
| committer | 2018-12-21 13:45:27 -0500 | |
| commit | 59ac3346ebe605bfb0f538d9fa045b32d86168cb (patch) | |
| tree | d2793ede352840b4326cc7c56fc8e7b7a3e6670f /src/core/hle/kernel/process.h | |
| parent | Merge pull request #1914 from lioncash/id (diff) | |
| parent | kernel/svc: Handle thread handles within GetProcessId (diff) | |
| download | yuzu-59ac3346ebe605bfb0f538d9fa045b32d86168cb.tar.gz yuzu-59ac3346ebe605bfb0f538d9fa045b32d86168cb.tar.xz yuzu-59ac3346ebe605bfb0f538d9fa045b32d86168cb.zip | |
Merge pull request #1925 from lioncash/pid
kernel/{process, thread}: Amend behavior related to IDs
Diffstat (limited to 'src/core/hle/kernel/process.h')
| -rw-r--r-- | src/core/hle/kernel/process.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index 459eedfa6..7da367251 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h | |||
| @@ -120,6 +120,18 @@ struct CodeSet final { | |||
| 120 | 120 | ||
| 121 | class Process final : public WaitObject { | 121 | class Process final : public WaitObject { |
| 122 | public: | 122 | public: |
| 123 | enum : u64 { | ||
| 124 | /// Lowest allowed process ID for a kernel initial process. | ||
| 125 | InitialKIPIDMin = 1, | ||
| 126 | /// Highest allowed process ID for a kernel initial process. | ||
| 127 | InitialKIPIDMax = 80, | ||
| 128 | |||
| 129 | /// Lowest allowed process ID for a userland process. | ||
| 130 | ProcessIDMin = 81, | ||
| 131 | /// Highest allowed process ID for a userland process. | ||
| 132 | ProcessIDMax = 0xFFFFFFFFFFFFFFFF, | ||
| 133 | }; | ||
| 134 | |||
| 123 | static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4; | 135 | static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4; |
| 124 | 136 | ||
| 125 | static SharedPtr<Process> Create(KernelCore& kernel, std::string&& name); | 137 | static SharedPtr<Process> Create(KernelCore& kernel, std::string&& name); |
| @@ -162,7 +174,7 @@ public: | |||
| 162 | } | 174 | } |
| 163 | 175 | ||
| 164 | /// Gets the unique ID that identifies this particular process. | 176 | /// Gets the unique ID that identifies this particular process. |
| 165 | u32 GetProcessID() const { | 177 | u64 GetProcessID() const { |
| 166 | return process_id; | 178 | return process_id; |
| 167 | } | 179 | } |
| 168 | 180 | ||
| @@ -288,10 +300,10 @@ private: | |||
| 288 | ProcessStatus status; | 300 | ProcessStatus status; |
| 289 | 301 | ||
| 290 | /// The ID of this process | 302 | /// The ID of this process |
| 291 | u32 process_id = 0; | 303 | u64 process_id = 0; |
| 292 | 304 | ||
| 293 | /// Title ID corresponding to the process | 305 | /// Title ID corresponding to the process |
| 294 | u64 program_id; | 306 | u64 program_id = 0; |
| 295 | 307 | ||
| 296 | /// Resource limit descriptor for this process | 308 | /// Resource limit descriptor for this process |
| 297 | SharedPtr<ResourceLimit> resource_limit; | 309 | SharedPtr<ResourceLimit> resource_limit; |