aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-12-31 16:06:11 -0500
committerbunnei <bunneidev@gmail.com>2017-12-31 16:06:11 -0500
commit001091fa720227a0075364b52c6778d8bdfacbd9 (patch)
tree91d12d051a78cc5b8c10fdcf16e9815adabc8d17 /src/core/hle/svc.cpp
parent283c63645d2d957e9d8adf86a55d728eb8539988 (diff)
svc: Cleanup svcGetThreadPriority.
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index fd33a59716..0c53db1c50 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -149,10 +149,12 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
}
/// Gets the priority for the specified thread
-static ResultCode GetThreadPriority(s32* priority, Kernel::Handle handle) {
- LOG_TRACE(Kernel_SVC, "called, handle=0x%08X", handle);
+static ResultCode GetThreadPriority(u32* priority, Handle handle) {
const SharedPtr<Kernel::Thread> thread = Kernel::g_handle_table.Get<Kernel::Thread>(handle);
- *priority = thread ? thread->GetPriority() : 0;
+ if (!thread)
+ return ERR_INVALID_HANDLE;
+
+ *priority = thread->GetPriority();
return RESULT_SUCCESS;
}