diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-01 20:38:34 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-01 20:38:34 +0100 |
commit | aa7c824ea422152e3e8ac4586a9b94d2c755c23d (patch) | |
tree | 31dbb609273a9bb4b66b3f40ef0de6fabe7daf2e /src/core/hle/kernel/process.h | |
parent | svc: Implement svcUnlockMutex. (diff) | |
download | yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar.gz yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar.bz2 yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar.lz yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar.xz yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.tar.zst yuzu-aa7c824ea422152e3e8ac4586a9b94d2c755c23d.zip |
Diffstat (limited to '')
-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 @@ #include <cstddef> #include <memory> #include <string> +#include <vector> #include <boost/container/static_vector.hpp> #include "common/bit_field.h" #include "common/common_types.h" @@ -48,6 +49,8 @@ union ProcessFlags { BitField<12, 1, u16> loaded_high; ///< Application loaded high (not at 0x00100000). }; +enum class ProcessStatus { Created, Running, Exited }; + class ResourceLimit; struct MemoryRegionInfo; @@ -124,6 +127,8 @@ public: u16 kernel_version = 0; /// The default CPU for this process, threads are scheduled on this cpu by default. u8 ideal_processor = 0; + /// Current status of the process + ProcessStatus status; /// The id of this process u32 process_id = next_process_id++; @@ -181,11 +186,15 @@ public: ResultCode UnmapMemory(VAddr dst_addr, VAddr src_addr, u64 size); - private: Process(); ~Process() override; }; +void ClearProcessList(); + +/// Retrieves a process from the current list of processes. +SharedPtr<Process> GetProcessById(u32 process_id); + extern SharedPtr<Process> g_current_process; -} +} // namespace Kernel |