summaryrefslogtreecommitdiffstats
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2015-05-12 01:23:45 +0200
committerSubv <subv2112@gmail.com>2015-05-12 01:23:45 +0200
commit25c010dc7dda010175da42e1184e87cd1a45cbe4 (patch)
tree0bb75d868f4e46987627a9cfdc798e05013488ab /src/core/hle/svc.cpp
parentCore/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread (diff)
downloadyuzu-25c010dc7dda010175da42e1184e87cd1a45cbe4.tar
yuzu-25c010dc7dda010175da42e1184e87cd1a45cbe4.tar.gz
yuzu-25c010dc7dda010175da42e1184e87cd1a45cbe4.tar.bz2
yuzu-25c010dc7dda010175da42e1184e87cd1a45cbe4.tar.lz
yuzu-25c010dc7dda010175da42e1184e87cd1a45cbe4.tar.xz
yuzu-25c010dc7dda010175da42e1184e87cd1a45cbe4.tar.zst
yuzu-25c010dc7dda010175da42e1184e87cd1a45cbe4.zip
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index b5cf554c3..e8159fbdb 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -426,28 +426,28 @@ static ResultCode ReleaseMutex(Handle handle) {
}
/// Get the ID of the specified process
-static ResultCode GetProcessId(u32* process_id, Handle handle) {
- LOG_TRACE(Kernel_SVC, "called process=0x%08X", handle);
+static ResultCode GetProcessId(u32* process_id, Handle process_handle) {
+ LOG_TRACE(Kernel_SVC, "called process=0x%08X", process_handle);
- const SharedPtr<Kernel::Process> process = Kernel::g_handle_table.Get<Kernel::Process>(handle);
+ const SharedPtr<Kernel::Process> process = Kernel::g_handle_table.Get<Kernel::Process>(process_handle);
if (process == nullptr)
return ERR_INVALID_HANDLE;
- *process_id = process->GetProcessId();
+ *process_id = process->process_id;
return RESULT_SUCCESS;
}
/// Get the ID of the process that owns the specified thread
-static ResultCode GetProcessIdOfThread(u32* process_id, Handle handle) {
- LOG_TRACE(Kernel_SVC, "called thread=0x%08X", handle);
+static ResultCode GetProcessIdOfThread(u32* process_id, Handle thread_handle) {
+ LOG_TRACE(Kernel_SVC, "called thread=0x%08X", thread_handle);
- const SharedPtr<Kernel::Thread> thread = Kernel::g_handle_table.Get<Kernel::Thread>(handle);
+ const SharedPtr<Kernel::Thread> thread = Kernel::g_handle_table.Get<Kernel::Thread>(thread_handle);
if (thread == nullptr)
return ERR_INVALID_HANDLE;
const SharedPtr<Kernel::Process> process = thread->owner_process;
- if (process == nullptr)
- return ERR_INVALID_HANDLE;
+
+ ASSERT_MSG(process != nullptr, "Invalid parent process for thread=0x%08X", thread_handle);
*process_id = process->process_id;
return RESULT_SUCCESS;