diff options
author | bunnei <bunneidev@gmail.com> | 2022-09-06 02:47:00 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-10-19 04:13:34 +0200 |
commit | 25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad (patch) | |
tree | 1007ca27eaa8cb9f76c0359903d11432e17c44d8 /src/core/hle/kernel/k_process.h | |
parent | core: hle: kernel: svc_types: Add SystemThreadPriorityHighest and ProcessState. (diff) | |
download | yuzu-25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad.tar yuzu-25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad.tar.gz yuzu-25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad.tar.bz2 yuzu-25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad.tar.lz yuzu-25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad.tar.xz yuzu-25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad.tar.zst yuzu-25dcaf1ecaeb3998a2cb8b03a7aa8a02402e0bad.zip |
Diffstat (limited to 'src/core/hle/kernel/k_process.h')
-rw-r--r-- | src/core/hle/kernel/k_process.h | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h index d56d73bab..b1c7da454 100644 --- a/src/core/hle/kernel/k_process.h +++ b/src/core/hle/kernel/k_process.h @@ -45,24 +45,6 @@ enum class MemoryRegion : u16 { BASE = 3, }; -/** - * Indicates the status of a Process instance. - * - * @note These match the values as used by kernel, - * so new entries should only be added if RE - * shows that a new value has been introduced. - */ -enum class ProcessStatus { - Created, - CreatedWithDebuggerAttached, - Running, - WaitingForDebuggerToAttach, - DebuggerAttached, - Exiting, - Exited, - DebugBreak, -}; - enum class ProcessActivity : u32 { Runnable, Paused, @@ -89,6 +71,17 @@ public: explicit KProcess(KernelCore& kernel_); ~KProcess() override; + enum class State { + Created = Svc::ProcessState_Created, + CreatedAttached = Svc::ProcessState_CreatedAttached, + Running = Svc::ProcessState_Running, + Crashed = Svc::ProcessState_Crashed, + RunningAttached = Svc::ProcessState_RunningAttached, + Terminating = Svc::ProcessState_Terminating, + Terminated = Svc::ProcessState_Terminated, + DebugBreak = Svc::ProcessState_DebugBreak, + }; + enum : u64 { /// Lowest allowed process ID for a kernel initial process. InitialKIPIDMin = 1, @@ -163,8 +156,8 @@ public: } /// Gets the current status of the process - ProcessStatus GetStatus() const { - return status; + State GetState() const { + return state; } /// Gets the unique ID that identifies this particular process. @@ -415,10 +408,7 @@ private: pinned_threads[core_id] = nullptr; } - /// Changes the process status. If the status is different - /// from the current process status, then this will trigger - /// a process signal. - void ChangeStatus(ProcessStatus new_status); + void ChangeState(State new_state); /// Allocates the main thread stack for the process, given the stack size in bytes. Result AllocateMainThreadStack(std::size_t stack_size); @@ -427,7 +417,7 @@ private: std::unique_ptr<KPageTable> page_table; /// Current status of the process - ProcessStatus status{}; + State state{}; /// The ID of this process u64 process_id = 0; |