diff options
| author | 2018-01-01 14:38:34 -0500 | |
|---|---|---|
| committer | 2018-01-01 14:38:34 -0500 | |
| commit | aa7c824ea422152e3e8ac4586a9b94d2c755c23d (patch) | |
| tree | 31dbb609273a9bb4b66b3f40ef0de6fabe7daf2e /src/core/hle/kernel/process.h | |
| parent | svc: Implement svcUnlockMutex. (diff) | |
| download | yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar.gz yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar.xz yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.zip | |
svc: Implement svcExitProcess.
Diffstat (limited to 'src/core/hle/kernel/process.h')
| -rw-r--r-- | src/core/hle/kernel/process.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index 3ea8c298f..305275387 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <cstddef> | 8 | #include <cstddef> |
| 9 | #include <memory> | 9 | #include <memory> |
| 10 | #include <string> | 10 | #include <string> |
| 11 | #include <vector> | ||
| 11 | #include <boost/container/static_vector.hpp> | 12 | #include <boost/container/static_vector.hpp> |
| 12 | #include "common/bit_field.h" | 13 | #include "common/bit_field.h" |
| 13 | #include "common/common_types.h" | 14 | #include "common/common_types.h" |
| @@ -48,6 +49,8 @@ union ProcessFlags { | |||
| 48 | BitField<12, 1, u16> loaded_high; ///< Application loaded high (not at 0x00100000). | 49 | BitField<12, 1, u16> loaded_high; ///< Application loaded high (not at 0x00100000). |
| 49 | }; | 50 | }; |
| 50 | 51 | ||
| 52 | enum class ProcessStatus { Created, Running, Exited }; | ||
| 53 | |||
| 51 | class ResourceLimit; | 54 | class ResourceLimit; |
| 52 | struct MemoryRegionInfo; | 55 | struct MemoryRegionInfo; |
| 53 | 56 | ||
| @@ -124,6 +127,8 @@ public: | |||
| 124 | u16 kernel_version = 0; | 127 | u16 kernel_version = 0; |
| 125 | /// The default CPU for this process, threads are scheduled on this cpu by default. | 128 | /// The default CPU for this process, threads are scheduled on this cpu by default. |
| 126 | u8 ideal_processor = 0; | 129 | u8 ideal_processor = 0; |
| 130 | /// Current status of the process | ||
| 131 | ProcessStatus status; | ||
| 127 | 132 | ||
| 128 | /// The id of this process | 133 | /// The id of this process |
| 129 | u32 process_id = next_process_id++; | 134 | u32 process_id = next_process_id++; |
| @@ -181,11 +186,15 @@ public: | |||
| 181 | 186 | ||
| 182 | ResultCode UnmapMemory(VAddr dst_addr, VAddr src_addr, u64 size); | 187 | ResultCode UnmapMemory(VAddr dst_addr, VAddr src_addr, u64 size); |
| 183 | 188 | ||
| 184 | |||
| 185 | private: | 189 | private: |
| 186 | Process(); | 190 | Process(); |
| 187 | ~Process() override; | 191 | ~Process() override; |
| 188 | }; | 192 | }; |
| 189 | 193 | ||
| 194 | void ClearProcessList(); | ||
| 195 | |||
| 196 | /// Retrieves a process from the current list of processes. | ||
| 197 | SharedPtr<Process> GetProcessById(u32 process_id); | ||
| 198 | |||
| 190 | extern SharedPtr<Process> g_current_process; | 199 | extern SharedPtr<Process> g_current_process; |
| 191 | } | 200 | } // namespace Kernel |