summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/address_arbiter.cpp1
-rw-r--r--src/core/hle/kernel/svc.cpp7
-rw-r--r--src/core/hle/kernel/synchronization.cpp1
3 files changed, 2 insertions, 7 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp
index 4d2a9b35d..df0debe1b 100644
--- a/src/core/hle/kernel/address_arbiter.cpp
+++ b/src/core/hle/kernel/address_arbiter.cpp
@@ -24,7 +24,6 @@ namespace Kernel {
24// Wake up num_to_wake (or all) threads in a vector. 24// Wake up num_to_wake (or all) threads in a vector.
25void AddressArbiter::WakeThreads(const std::vector<std::shared_ptr<Thread>>& waiting_threads, 25void AddressArbiter::WakeThreads(const std::vector<std::shared_ptr<Thread>>& waiting_threads,
26 s32 num_to_wake) { 26 s32 num_to_wake) {
27 auto& time_manager = system.Kernel().TimeManager();
28 // Only process up to 'target' threads, unless 'target' is <= 0, in which case process 27 // Only process up to 'target' threads, unless 'target' is <= 0, in which case process
29 // them all. 28 // them all.
30 std::size_t last = waiting_threads.size(); 29 std::size_t last = waiting_threads.size();
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 5db19dcf3..01ae57053 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -458,9 +458,7 @@ static ResultCode WaitSynchronization(Core::System& system, Handle* index, VAddr
458 return ERR_OUT_OF_RANGE; 458 return ERR_OUT_OF_RANGE;
459 } 459 }
460 460
461 auto* const thread = system.CurrentScheduler().GetCurrentThread();
462 auto& kernel = system.Kernel(); 461 auto& kernel = system.Kernel();
463 using ObjectPtr = Thread::ThreadSynchronizationObjects::value_type;
464 Thread::ThreadSynchronizationObjects objects(handle_count); 462 Thread::ThreadSynchronizationObjects objects(handle_count);
465 const auto& handle_table = kernel.CurrentProcess()->GetHandleTable(); 463 const auto& handle_table = kernel.CurrentProcess()->GetHandleTable();
466 464
@@ -1750,9 +1748,9 @@ static void SignalProcessWideKey(Core::System& system, VAddr condition_variable_
1750 // Only process up to 'target' threads, unless 'target' is less equal 0, in which case process 1748 // Only process up to 'target' threads, unless 'target' is less equal 0, in which case process
1751 // them all. 1749 // them all.
1752 std::size_t last = waiting_threads.size(); 1750 std::size_t last = waiting_threads.size();
1753 if (target > 0) 1751 if (target > 0) {
1754 last = std::min(waiting_threads.size(), static_cast<std::size_t>(target)); 1752 last = std::min(waiting_threads.size(), static_cast<std::size_t>(target));
1755 auto& time_manager = kernel.TimeManager(); 1753 }
1756 for (std::size_t index = 0; index < last; ++index) { 1754 for (std::size_t index = 0; index < last; ++index) {
1757 auto& thread = waiting_threads[index]; 1755 auto& thread = waiting_threads[index];
1758 1756
@@ -1763,7 +1761,6 @@ static void SignalProcessWideKey(Core::System& system, VAddr condition_variable_
1763 1761
1764 const std::size_t current_core = system.CurrentCoreIndex(); 1762 const std::size_t current_core = system.CurrentCoreIndex();
1765 auto& monitor = system.Monitor(); 1763 auto& monitor = system.Monitor();
1766 auto& memory = system.Memory();
1767 1764
1768 // Atomically read the value of the mutex. 1765 // Atomically read the value of the mutex.
1769 u32 mutex_val = 0; 1766 u32 mutex_val = 0;
diff --git a/src/core/hle/kernel/synchronization.cpp b/src/core/hle/kernel/synchronization.cpp
index 851b702a5..8b875d853 100644
--- a/src/core/hle/kernel/synchronization.cpp
+++ b/src/core/hle/kernel/synchronization.cpp
@@ -19,7 +19,6 @@ Synchronization::Synchronization(Core::System& system) : system{system} {}
19void Synchronization::SignalObject(SynchronizationObject& obj) const { 19void Synchronization::SignalObject(SynchronizationObject& obj) const {
20 auto& kernel = system.Kernel(); 20 auto& kernel = system.Kernel();
21 SchedulerLock lock(kernel); 21 SchedulerLock lock(kernel);
22 auto& time_manager = kernel.TimeManager();
23 if (obj.IsSignaled()) { 22 if (obj.IsSignaled()) {
24 for (auto thread : obj.GetWaitingThreads()) { 23 for (auto thread : obj.GetWaitingThreads()) {
25 if (thread->GetSchedulingStatus() == ThreadSchedStatus::Paused) { 24 if (thread->GetSchedulingStatus() == ThreadSchedStatus::Paused) {