aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-12-21 13:45:27 -0500
committerGitHub <noreply@github.com>2018-12-21 13:45:27 -0500
commit59ac3346ebe605bfb0f538d9fa045b32d86168cb (patch)
treed2793ede352840b4326cc7c56fc8e7b7a3e6670f /src/core/hle/kernel/process.h
parent41cbd088c2b1ddf4ba513f296a307595644fffdc (diff)
parentb74eb88c68e85d08695667eaf4603bb565c8eb64 (diff)
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.h18
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 {
class Process final : public WaitObject {
public:
+ enum : u64 {
+ /// Lowest allowed process ID for a kernel initial process.
+ InitialKIPIDMin = 1,
+ /// Highest allowed process ID for a kernel initial process.
+ InitialKIPIDMax = 80,
+
+ /// Lowest allowed process ID for a userland process.
+ ProcessIDMin = 81,
+ /// Highest allowed process ID for a userland process.
+ ProcessIDMax = 0xFFFFFFFFFFFFFFFF,
+ };
+
static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4;
static SharedPtr<Process> Create(KernelCore& kernel, std::string&& name);
@@ -162,7 +174,7 @@ public:
}
/// Gets the unique ID that identifies this particular process.
- u32 GetProcessID() const {
+ u64 GetProcessID() const {
return process_id;
}
@@ -288,10 +300,10 @@ private:
ProcessStatus status;
/// The ID of this process
- u32 process_id = 0;
+ u64 process_id = 0;
/// Title ID corresponding to the process
- u64 program_id;
+ u64 program_id = 0;
/// Resource limit descriptor for this process
SharedPtr<ResourceLimit> resource_limit;