diff options
| author | 2019-04-02 21:40:39 -0400 | |
|---|---|---|
| committer | 2019-04-02 21:40:39 -0400 | |
| commit | e796351a0de70d75993e326b8828229416216d91 (patch) | |
| tree | 0f5b340a115a98383202f3a848987ddd3ce361b2 /src/core/hle/kernel/process.h | |
| parent | Merge pull request #2313 from lioncash/reslimit (diff) | |
| parent | kernel/svc: Implement svcGetThreadList (diff) | |
| download | yuzu-e796351a0de70d75993e326b8828229416216d91.tar.gz yuzu-e796351a0de70d75993e326b8828229416216d91.tar.xz yuzu-e796351a0de70d75993e326b8828229416216d91.zip | |
Merge pull request #2270 from lioncash/plist
kernel/svc: Implement svcGetProcessList and svcGetThreadList
Diffstat (limited to 'src/core/hle/kernel/process.h')
| -rw-r--r-- | src/core/hle/kernel/process.h | 17 |
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 @@ | |||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <bitset> | 8 | #include <bitset> |
| 9 | #include <cstddef> | 9 | #include <cstddef> |
| 10 | #include <list> | ||
| 10 | #include <string> | 11 | #include <string> |
| 11 | #include <vector> | 12 | #include <vector> |
| 12 | #include <boost/container/static_vector.hpp> | 13 | #include <boost/container/static_vector.hpp> |
| @@ -189,6 +190,19 @@ public: | |||
| 189 | /// Retrieves the total physical memory used by this process in bytes. | 190 | /// Retrieves the total physical memory used by this process in bytes. |
| 190 | u64 GetTotalPhysicalMemoryUsed() const; | 191 | u64 GetTotalPhysicalMemoryUsed() const; |
| 191 | 192 | ||
| 193 | /// Gets the list of all threads created with this process as their owner. | ||
| 194 | const std::list<const Thread*>& GetThreadList() const { | ||
| 195 | return thread_list; | ||
| 196 | } | ||
| 197 | |||
| 198 | /// Registers a thread as being created under this process, | ||
| 199 | /// adding it to this process' thread list. | ||
| 200 | void RegisterThread(const Thread* thread); | ||
| 201 | |||
| 202 | /// Unregisters a thread from this process, removing it | ||
| 203 | /// from this process' thread list. | ||
| 204 | void UnregisterThread(const Thread* thread); | ||
| 205 | |||
| 192 | /// Clears the signaled state of the process if and only if it's signaled. | 206 | /// Clears the signaled state of the process if and only if it's signaled. |
| 193 | /// | 207 | /// |
| 194 | /// @pre The process must not be already terminated. If this is called on a | 208 | /// @pre The process must not be already terminated. If this is called on a |
| @@ -308,6 +322,9 @@ private: | |||
| 308 | /// Random values for svcGetInfo RandomEntropy | 322 | /// Random values for svcGetInfo RandomEntropy |
| 309 | std::array<u64, RANDOM_ENTROPY_SIZE> random_entropy; | 323 | std::array<u64, RANDOM_ENTROPY_SIZE> random_entropy; |
| 310 | 324 | ||
| 325 | /// List of threads that are running with this process as their owner. | ||
| 326 | std::list<const Thread*> thread_list; | ||
| 327 | |||
| 311 | /// System context | 328 | /// System context |
| 312 | Core::System& system; | 329 | Core::System& system; |
| 313 | 330 | ||