aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorGravatar Subv <subv2112@gmail.com>2015-05-11 09:15:10 -0500
committerGravatar Subv <subv2112@gmail.com>2015-05-11 09:15:10 -0500
commit41f74a16fd55934f747f6f7e1f7a6d4d6a3d4e57 (patch)
treeb9500ee328f5b918edca38251878c4f346a30807 /src/core/hle/kernel/process.h
parente98fbadf4a49eecc6d39c082cba683d5d88ea2c5 (diff)
Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread
Diffstat (limited to 'src/core/hle/kernel/process.h')
-rw-r--r--src/core/hle/kernel/process.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index 88ed9a5a..11c2ad12 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -55,6 +55,14 @@ public:
static const HandleType HANDLE_TYPE = HandleType::Process;
HandleType GetHandleType() const override { return HANDLE_TYPE; }
+ static u32 next_process_id;
+
+ /*
+ * Gets the process' id
+ * @returns The process' id
+ */
+ u32 GetProcessId() const { return process_id; }
+
/// Name of the process
std::string name;
/// Title ID corresponding to the process
@@ -69,6 +77,9 @@ public:
boost::container::static_vector<AddressMapping, 8> address_mappings;
ProcessFlags flags;
+ /// The id of this process
+ u32 process_id = next_process_id++;
+
/**
* Parses a list of kernel capability descriptors (as found in the ExHeader) and applies them
* to this process.