summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2019-04-17 21:46:46 -0400
committerGravatar GitHub2019-04-17 21:46:46 -0400
commit83b830eb2f80de8073a7304ab6270621d062d0b2 (patch)
tree40c965879105facd5deb0c65262d993ddbf6c30f /src/core/hle/kernel/svc.cpp
parentMerge pull request #2318 from ReinUsesLisp/sampler-cache (diff)
parentsvc: Specify handle value in thread's name (diff)
downloadyuzu-83b830eb2f80de8073a7304ab6270621d062d0b2.tar.gz
yuzu-83b830eb2f80de8073a7304ab6270621d062d0b2.tar.xz
yuzu-83b830eb2f80de8073a7304ab6270621d062d0b2.zip
Merge pull request #2397 from lioncash/thread-unused
kernel/thread: Remove unused guest_handle member variable
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index d48a2203a..4eeb97bef 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1380,20 +1380,22 @@ static ResultCode CreateThread(Core::System& system, Handle* out_handle, VAddr e
1380 return ERR_INVALID_THREAD_PRIORITY; 1380 return ERR_INVALID_THREAD_PRIORITY;
1381 } 1381 }
1382 1382
1383 const std::string name = fmt::format("thread-{:X}", entry_point);
1384 auto& kernel = system.Kernel(); 1383 auto& kernel = system.Kernel();
1385 CASCADE_RESULT(SharedPtr<Thread> thread, 1384 CASCADE_RESULT(SharedPtr<Thread> thread,
1386 Thread::Create(kernel, name, entry_point, priority, arg, processor_id, stack_top, 1385 Thread::Create(kernel, "", entry_point, priority, arg, processor_id, stack_top,
1387 *current_process)); 1386 *current_process));
1388 1387
1389 const auto new_guest_handle = current_process->GetHandleTable().Create(thread); 1388 const auto new_thread_handle = current_process->GetHandleTable().Create(thread);
1390 if (new_guest_handle.Failed()) { 1389 if (new_thread_handle.Failed()) {
1391 LOG_ERROR(Kernel_SVC, "Failed to create handle with error=0x{:X}", 1390 LOG_ERROR(Kernel_SVC, "Failed to create handle with error=0x{:X}",
1392 new_guest_handle.Code().raw); 1391 new_thread_handle.Code().raw);
1393 return new_guest_handle.Code(); 1392 return new_thread_handle.Code();
1394 } 1393 }
1395 thread->SetGuestHandle(*new_guest_handle); 1394 *out_handle = *new_thread_handle;
1396 *out_handle = *new_guest_handle; 1395
1396 // Set the thread name for debugging purposes.
1397 thread->SetName(
1398 fmt::format("thread[entry_point={:X}, handle={:X}]", entry_point, *new_thread_handle));
1397 1399
1398 system.CpuCore(thread->GetProcessorID()).PrepareReschedule(); 1400 system.CpuCore(thread->GetProcessorID()).PrepareReschedule();
1399 1401