summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2020-12-30 23:01:08 -0800
committerGravatar bunnei2021-01-28 21:42:25 -0800
commitc0d3aef28c0a0c68c18de30228f29e30f0e52533 (patch)
tree2f94a5f6e5fec4d288272f9a476ee85a8da3d0ac /src/core/hle/kernel/svc.cpp
parentMerge pull request #5837 from german77/socketstub (diff)
downloadyuzu-c0d3aef28c0a0c68c18de30228f29e30f0e52533.tar.gz
yuzu-c0d3aef28c0a0c68c18de30228f29e30f0e52533.tar.xz
yuzu-c0d3aef28c0a0c68c18de30228f29e30f0e52533.zip
core: hle: kernel: Rename Thread to KThread.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index cc8b661af..3609346d6 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -29,6 +29,7 @@
29#include "core/hle/kernel/k_scheduler.h" 29#include "core/hle/kernel/k_scheduler.h"
30#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h" 30#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h"
31#include "core/hle/kernel/k_synchronization_object.h" 31#include "core/hle/kernel/k_synchronization_object.h"
32#include "core/hle/kernel/k_thread.h"
32#include "core/hle/kernel/kernel.h" 33#include "core/hle/kernel/kernel.h"
33#include "core/hle/kernel/memory/memory_block.h" 34#include "core/hle/kernel/memory/memory_block.h"
34#include "core/hle/kernel/memory/memory_layout.h" 35#include "core/hle/kernel/memory/memory_layout.h"
@@ -42,7 +43,6 @@
42#include "core/hle/kernel/svc_results.h" 43#include "core/hle/kernel/svc_results.h"
43#include "core/hle/kernel/svc_types.h" 44#include "core/hle/kernel/svc_types.h"
44#include "core/hle/kernel/svc_wrap.h" 45#include "core/hle/kernel/svc_wrap.h"
45#include "core/hle/kernel/thread.h"
46#include "core/hle/kernel/time_manager.h" 46#include "core/hle/kernel/time_manager.h"
47#include "core/hle/kernel/transfer_memory.h" 47#include "core/hle/kernel/transfer_memory.h"
48#include "core/hle/kernel/writable_event.h" 48#include "core/hle/kernel/writable_event.h"
@@ -363,7 +363,7 @@ static ResultCode GetThreadId(Core::System& system, u64* thread_id, Handle threa
363 LOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle); 363 LOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
364 364
365 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); 365 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable();
366 const std::shared_ptr<Thread> thread = handle_table.Get<Thread>(thread_handle); 366 const std::shared_ptr<KThread> thread = handle_table.Get<KThread>(thread_handle);
367 if (!thread) { 367 if (!thread) {
368 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", thread_handle); 368 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", thread_handle);
369 return ERR_INVALID_HANDLE; 369 return ERR_INVALID_HANDLE;
@@ -395,7 +395,7 @@ static ResultCode GetProcessId(Core::System& system, u64* process_id, Handle han
395 return RESULT_SUCCESS; 395 return RESULT_SUCCESS;
396 } 396 }
397 397
398 const std::shared_ptr<Thread> thread = handle_table.Get<Thread>(handle); 398 const std::shared_ptr<KThread> thread = handle_table.Get<KThread>(handle);
399 if (thread) { 399 if (thread) {
400 const Process* const owner_process = thread->GetOwnerProcess(); 400 const Process* const owner_process = thread->GetOwnerProcess();
401 if (!owner_process) { 401 if (!owner_process) {
@@ -474,7 +474,7 @@ static ResultCode CancelSynchronization(Core::System& system, Handle thread_hand
474 LOG_TRACE(Kernel_SVC, "called thread=0x{:X}", thread_handle); 474 LOG_TRACE(Kernel_SVC, "called thread=0x{:X}", thread_handle);
475 475
476 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); 476 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable();
477 std::shared_ptr<Thread> thread = handle_table.Get<Thread>(thread_handle); 477 std::shared_ptr<KThread> thread = handle_table.Get<KThread>(thread_handle);
478 if (!thread) { 478 if (!thread) {
479 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}", 479 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}",
480 thread_handle); 480 thread_handle);
@@ -872,7 +872,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
872 return ERR_INVALID_COMBINATION; 872 return ERR_INVALID_COMBINATION;
873 } 873 }
874 874
875 const auto thread = system.Kernel().CurrentProcess()->GetHandleTable().Get<Thread>( 875 const auto thread = system.Kernel().CurrentProcess()->GetHandleTable().Get<KThread>(
876 static_cast<Handle>(handle)); 876 static_cast<Handle>(handle));
877 if (!thread) { 877 if (!thread) {
878 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", 878 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}",
@@ -1033,7 +1033,7 @@ static ResultCode SetThreadActivity(Core::System& system, Handle handle, u32 act
1033 } 1033 }
1034 1034
1035 const auto* current_process = system.Kernel().CurrentProcess(); 1035 const auto* current_process = system.Kernel().CurrentProcess();
1036 const std::shared_ptr<Thread> thread = current_process->GetHandleTable().Get<Thread>(handle); 1036 const std::shared_ptr<KThread> thread = current_process->GetHandleTable().Get<KThread>(handle);
1037 if (!thread) { 1037 if (!thread) {
1038 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle); 1038 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle);
1039 return ERR_INVALID_HANDLE; 1039 return ERR_INVALID_HANDLE;
@@ -1066,7 +1066,7 @@ static ResultCode GetThreadContext(Core::System& system, VAddr thread_context, H
1066 LOG_DEBUG(Kernel_SVC, "called, context=0x{:08X}, thread=0x{:X}", thread_context, handle); 1066 LOG_DEBUG(Kernel_SVC, "called, context=0x{:08X}, thread=0x{:X}", thread_context, handle);
1067 1067
1068 const auto* current_process = system.Kernel().CurrentProcess(); 1068 const auto* current_process = system.Kernel().CurrentProcess();
1069 const std::shared_ptr<Thread> thread = current_process->GetHandleTable().Get<Thread>(handle); 1069 const std::shared_ptr<KThread> thread = current_process->GetHandleTable().Get<KThread>(handle);
1070 if (!thread) { 1070 if (!thread) {
1071 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle); 1071 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle);
1072 return ERR_INVALID_HANDLE; 1072 return ERR_INVALID_HANDLE;
@@ -1111,7 +1111,7 @@ static ResultCode GetThreadPriority(Core::System& system, u32* priority, Handle
1111 LOG_TRACE(Kernel_SVC, "called"); 1111 LOG_TRACE(Kernel_SVC, "called");
1112 1112
1113 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); 1113 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable();
1114 const std::shared_ptr<Thread> thread = handle_table.Get<Thread>(handle); 1114 const std::shared_ptr<KThread> thread = handle_table.Get<KThread>(handle);
1115 if (!thread) { 1115 if (!thread) {
1116 *priority = 0; 1116 *priority = 0;
1117 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle); 1117 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle);
@@ -1140,7 +1140,7 @@ static ResultCode SetThreadPriority(Core::System& system, Handle handle, u32 pri
1140 1140
1141 const auto* const current_process = system.Kernel().CurrentProcess(); 1141 const auto* const current_process = system.Kernel().CurrentProcess();
1142 1142
1143 std::shared_ptr<Thread> thread = current_process->GetHandleTable().Get<Thread>(handle); 1143 std::shared_ptr<KThread> thread = current_process->GetHandleTable().Get<KThread>(handle);
1144 if (!thread) { 1144 if (!thread) {
1145 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle); 1145 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", handle);
1146 return ERR_INVALID_HANDLE; 1146 return ERR_INVALID_HANDLE;
@@ -1489,9 +1489,9 @@ static ResultCode CreateThread(Core::System& system, Handle* out_handle, VAddr e
1489 ASSERT(kernel.CurrentProcess()->GetResourceLimit()->Reserve(ResourceType::Threads, 1)); 1489 ASSERT(kernel.CurrentProcess()->GetResourceLimit()->Reserve(ResourceType::Threads, 1));
1490 1490
1491 ThreadType type = THREADTYPE_USER; 1491 ThreadType type = THREADTYPE_USER;
1492 CASCADE_RESULT(std::shared_ptr<Thread> thread, 1492 CASCADE_RESULT(std::shared_ptr<KThread> thread,
1493 Thread::Create(system, type, "", entry_point, priority, arg, processor_id, 1493 KThread::Create(system, type, "", entry_point, priority, arg, processor_id,
1494 stack_top, current_process)); 1494 stack_top, current_process));
1495 1495
1496 const auto new_thread_handle = current_process->GetHandleTable().Create(thread); 1496 const auto new_thread_handle = current_process->GetHandleTable().Create(thread);
1497 if (new_thread_handle.Failed()) { 1497 if (new_thread_handle.Failed()) {
@@ -1518,7 +1518,7 @@ static ResultCode StartThread(Core::System& system, Handle thread_handle) {
1518 LOG_DEBUG(Kernel_SVC, "called thread=0x{:08X}", thread_handle); 1518 LOG_DEBUG(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
1519 1519
1520 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); 1520 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable();
1521 const std::shared_ptr<Thread> thread = handle_table.Get<Thread>(thread_handle); 1521 const std::shared_ptr<KThread> thread = handle_table.Get<KThread>(thread_handle);
1522 if (!thread) { 1522 if (!thread) {
1523 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}", 1523 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}",
1524 thread_handle); 1524 thread_handle);
@@ -1844,7 +1844,7 @@ static ResultCode GetThreadCoreMask(Core::System& system, Handle thread_handle,
1844 LOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}", thread_handle); 1844 LOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}", thread_handle);
1845 1845
1846 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); 1846 const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable();
1847 const std::shared_ptr<Thread> thread = handle_table.Get<Thread>(thread_handle); 1847 const std::shared_ptr<KThread> thread = handle_table.Get<KThread>(thread_handle);
1848 if (!thread) { 1848 if (!thread) {
1849 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}", 1849 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}",
1850 thread_handle); 1850 thread_handle);
@@ -1914,7 +1914,7 @@ static ResultCode SetThreadCoreMask(Core::System& system, Handle thread_handle,
1914 } 1914 }
1915 1915
1916 const auto& handle_table = current_process->GetHandleTable(); 1916 const auto& handle_table = current_process->GetHandleTable();
1917 const std::shared_ptr<Thread> thread = handle_table.Get<Thread>(thread_handle); 1917 const std::shared_ptr<KThread> thread = handle_table.Get<KThread>(thread_handle);
1918 if (!thread) { 1918 if (!thread) {
1919 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}", 1919 LOG_ERROR(Kernel_SVC, "Thread handle does not exist, thread_handle=0x{:08X}",
1920 thread_handle); 1920 thread_handle);