summaryrefslogtreecommitdiff
path: root/src/core/hle/service/pm
diff options
context:
space:
mode:
authorGravatar bunnei2021-04-23 22:04:28 -0700
committerGravatar bunnei2021-05-05 16:40:52 -0700
commit2a7eff57a8048933a89c1a8f8d6dced7b5d604f2 (patch)
tree757a2207ab4d29b39ee8d9ddfa79966283d4d24a /src/core/hle/service/pm
parenthle: kernel: Remove deprecated Object class. (diff)
downloadyuzu-2a7eff57a8048933a89c1a8f8d6dced7b5d604f2.tar.gz
yuzu-2a7eff57a8048933a89c1a8f8d6dced7b5d604f2.tar.xz
yuzu-2a7eff57a8048933a89c1a8f8d6dced7b5d604f2.zip
hle: kernel: Rename Process to KProcess.
Diffstat (limited to 'src/core/hle/service/pm')
-rw-r--r--src/core/hle/service/pm/pm.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index 3a00849e1..f4715935d 100644
--- a/src/core/hle/service/pm/pm.cpp
+++ b/src/core/hle/service/pm/pm.cpp
@@ -4,8 +4,8 @@
4 4
5#include "core/core.h" 5#include "core/core.h"
6#include "core/hle/ipc_helpers.h" 6#include "core/hle/ipc_helpers.h"
7#include "core/hle/kernel/k_process.h"
7#include "core/hle/kernel/kernel.h" 8#include "core/hle/kernel/kernel.h"
8#include "core/hle/kernel/process.h"
9#include "core/hle/service/pm/pm.h" 9#include "core/hle/service/pm/pm.h"
10#include "core/hle/service/service.h" 10#include "core/hle/service/service.h"
11 11
@@ -17,8 +17,9 @@ constexpr ResultCode ERROR_PROCESS_NOT_FOUND{ErrorModule::PM, 1};
17 17
18constexpr u64 NO_PROCESS_FOUND_PID{0}; 18constexpr u64 NO_PROCESS_FOUND_PID{0};
19 19
20std::optional<Kernel::Process*> SearchProcessList(const std::vector<Kernel::Process*>& process_list, 20std::optional<Kernel::KProcess*> SearchProcessList(
21 std::function<bool(Kernel::Process*)> predicate) { 21 const std::vector<Kernel::KProcess*>& process_list,
22 std::function<bool(Kernel::KProcess*)> predicate) {
22 const auto iter = std::find_if(process_list.begin(), process_list.end(), predicate); 23 const auto iter = std::find_if(process_list.begin(), process_list.end(), predicate);
23 24
24 if (iter == process_list.end()) { 25 if (iter == process_list.end()) {
@@ -29,9 +30,9 @@ std::optional<Kernel::Process*> SearchProcessList(const std::vector<Kernel::Proc
29} 30}
30 31
31void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx, 32void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx,
32 const std::vector<Kernel::Process*>& process_list) { 33 const std::vector<Kernel::KProcess*>& process_list) {
33 const auto process = SearchProcessList(process_list, [](const auto& process) { 34 const auto process = SearchProcessList(process_list, [](const auto& process) {
34 return process->GetProcessID() == Kernel::Process::ProcessIDMin; 35 return process->GetProcessID() == Kernel::KProcess::ProcessIDMin;
35 }); 36 });
36 37
37 IPC::ResponseBuilder rb{ctx, 4}; 38 IPC::ResponseBuilder rb{ctx, 4};
@@ -124,7 +125,7 @@ private:
124 125
125class Info final : public ServiceFramework<Info> { 126class Info final : public ServiceFramework<Info> {
126public: 127public:
127 explicit Info(Core::System& system_, const std::vector<Kernel::Process*>& process_list_) 128 explicit Info(Core::System& system_, const std::vector<Kernel::KProcess*>& process_list_)
128 : ServiceFramework{system_, "pm:info"}, process_list{process_list_} { 129 : ServiceFramework{system_, "pm:info"}, process_list{process_list_} {
129 static const FunctionInfo functions[] = { 130 static const FunctionInfo functions[] = {
130 {0, &Info::GetTitleId, "GetTitleId"}, 131 {0, &Info::GetTitleId, "GetTitleId"},
@@ -154,7 +155,7 @@ private:
154 rb.Push((*process)->GetTitleID()); 155 rb.Push((*process)->GetTitleID());
155 } 156 }
156 157
157 const std::vector<Kernel::Process*>& process_list; 158 const std::vector<Kernel::KProcess*>& process_list;
158}; 159};
159 160
160class Shell final : public ServiceFramework<Shell> { 161class Shell final : public ServiceFramework<Shell> {