diff options
author | Liam <byteslice@airmail.cc> | 2024-01-03 01:22:02 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-30 00:43:45 +0100 |
commit | a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96 (patch) | |
tree | 075bbdbcf1d3afa6404220b14490be77fdacc32c /src/core/hle/service/am/process.h | |
parent | service: split am into components (diff) | |
download | yuzu-a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96.tar yuzu-a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96.tar.gz yuzu-a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96.tar.bz2 yuzu-a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96.tar.lz yuzu-a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96.tar.xz yuzu-a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96.tar.zst yuzu-a7e9d7842dc78e09bfe50ba3bc471b8a75d29b96.zip |
Diffstat (limited to 'src/core/hle/service/am/process.h')
-rw-r--r-- | src/core/hle/service/am/process.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/core/hle/service/am/process.h b/src/core/hle/service/am/process.h new file mode 100644 index 000000000..4b908ade4 --- /dev/null +++ b/src/core/hle/service/am/process.h @@ -0,0 +1,50 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/common_funcs.h" +#include "common/common_types.h" + +namespace Kernel { +class KProcess; +} + +namespace Core { +class System; +} + +namespace Service::AM { + +class Process { +public: + explicit Process(Core::System& system); + ~Process(); + + bool Initialize(u64 program_id); + void Finalize(); + + bool Run(); + void Terminate(); + + bool IsInitialized() const { + return m_process != nullptr; + } + u64 GetProcessId() const; + u64 GetProgramId() const { + return m_program_id; + } + Kernel::KProcess* GetProcess() const { + return m_process; + } + +private: + Core::System& m_system; + Kernel::KProcess* m_process{}; + s32 m_main_thread_priority{}; + u64 m_main_thread_stack_size{}; + u64 m_program_id{}; + bool m_process_started{}; +}; + +} // namespace Service::AM |