summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/process.h
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-01-31 17:25:28 +0100
committerGitHub <noreply@github.com>2024-01-31 17:25:28 +0100
commit7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c (patch)
tree24b2ed412f2683c8460839778ea7761d052bc38f /src/core/hle/service/am/process.h
parentMerge pull request #12858 from liamwhite/non-blocking (diff)
parentam: push storage from error applet with non-zero size (diff)
downloadyuzu-7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c.tar
yuzu-7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c.tar.gz
yuzu-7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c.tar.bz2
yuzu-7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c.tar.lz
yuzu-7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c.tar.xz
yuzu-7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c.tar.zst
yuzu-7cc7d027f74b5bffc0b3f8f3a6c3110999c7cc4c.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/am/process.h50
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