summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-01 14:38:34 -0500
committerGravatar bunnei2018-01-01 14:38:34 -0500
commitaa7c824ea422152e3e8ac4586a9b94d2c755c23d (patch)
tree31dbb609273a9bb4b66b3f40ef0de6fabe7daf2e /src/core/hle/kernel/process.h
parentsvc: Implement svcUnlockMutex. (diff)
downloadyuzu-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.h13
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
52enum class ProcessStatus { Created, Running, Exited };
53
51class ResourceLimit; 54class ResourceLimit;
52struct MemoryRegionInfo; 55struct 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
185private: 189private:
186 Process(); 190 Process();
187 ~Process() override; 191 ~Process() override;
188}; 192};
189 193
194void ClearProcessList();
195
196/// Retrieves a process from the current list of processes.
197SharedPtr<Process> GetProcessById(u32 process_id);
198
190extern SharedPtr<Process> g_current_process; 199extern SharedPtr<Process> g_current_process;
191} 200} // namespace Kernel