summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-03-20 23:53:48 +0100
committerLioncash <mathew1800@gmail.com>2019-04-02 06:48:40 +0200
commit28719ee3b4884d182126bddf639e1711b0744b22 (patch)
tree3c8f4310e23117c330979c2c149d24a82104f04c /src/core/hle/kernel/process.h
parentkernel/svc: Implement svcGetProcessList (diff)
downloadyuzu-28719ee3b4884d182126bddf639e1711b0744b22.tar
yuzu-28719ee3b4884d182126bddf639e1711b0744b22.tar.gz
yuzu-28719ee3b4884d182126bddf639e1711b0744b22.tar.bz2
yuzu-28719ee3b4884d182126bddf639e1711b0744b22.tar.lz
yuzu-28719ee3b4884d182126bddf639e1711b0744b22.tar.xz
yuzu-28719ee3b4884d182126bddf639e1711b0744b22.tar.zst
yuzu-28719ee3b4884d182126bddf639e1711b0744b22.zip
Diffstat (limited to 'src/core/hle/kernel/process.h')
-rw-r--r--src/core/hle/kernel/process.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index 732d12170..f9ddc937c 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -7,6 +7,7 @@
#include <array>
#include <bitset>
#include <cstddef>
+#include <list>
#include <string>
#include <vector>
#include <boost/container/static_vector.hpp>
@@ -189,6 +190,19 @@ public:
/// Retrieves the total physical memory used by this process in bytes.
u64 GetTotalPhysicalMemoryUsed() const;
+ /// Gets the list of all threads created with this process as their owner.
+ const std::list<const Thread*>& GetThreadList() const {
+ return thread_list;
+ }
+
+ /// Registers a thread as being created under this process,
+ /// adding it to this process' thread list.
+ void RegisterThread(const Thread* thread);
+
+ /// Unregisters a thread from this process, removing it
+ /// from this process' thread list.
+ void UnregisterThread(const Thread* thread);
+
/// Clears the signaled state of the process if and only if it's signaled.
///
/// @pre The process must not be already terminated. If this is called on a
@@ -308,6 +322,9 @@ private:
/// Random values for svcGetInfo RandomEntropy
std::array<u64, RANDOM_ENTROPY_SIZE> random_entropy;
+ /// List of threads that are running with this process as their owner.
+ std::list<const Thread*> thread_list;
+
/// System context
Core::System& system;