mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 02:32:46 +01:00
kernel: Remove unused variables
Resolves some compiler warnings in the Linux build.
This commit is contained in:
parent
d84d9a64b3
commit
2bab07c367
3 changed files with 2 additions and 7 deletions
|
@ -24,7 +24,6 @@ namespace Kernel {
|
||||||
// Wake up num_to_wake (or all) threads in a vector.
|
// Wake up num_to_wake (or all) threads in a vector.
|
||||||
void AddressArbiter::WakeThreads(const std::vector<std::shared_ptr<Thread>>& waiting_threads,
|
void AddressArbiter::WakeThreads(const std::vector<std::shared_ptr<Thread>>& waiting_threads,
|
||||||
s32 num_to_wake) {
|
s32 num_to_wake) {
|
||||||
auto& time_manager = system.Kernel().TimeManager();
|
|
||||||
// Only process up to 'target' threads, unless 'target' is <= 0, in which case process
|
// Only process up to 'target' threads, unless 'target' is <= 0, in which case process
|
||||||
// them all.
|
// them all.
|
||||||
std::size_t last = waiting_threads.size();
|
std::size_t last = waiting_threads.size();
|
||||||
|
|
|
@ -458,9 +458,7 @@ static ResultCode WaitSynchronization(Core::System& system, Handle* index, VAddr
|
||||||
return ERR_OUT_OF_RANGE;
|
return ERR_OUT_OF_RANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto* const thread = system.CurrentScheduler().GetCurrentThread();
|
|
||||||
auto& kernel = system.Kernel();
|
auto& kernel = system.Kernel();
|
||||||
using ObjectPtr = Thread::ThreadSynchronizationObjects::value_type;
|
|
||||||
Thread::ThreadSynchronizationObjects objects(handle_count);
|
Thread::ThreadSynchronizationObjects objects(handle_count);
|
||||||
const auto& handle_table = kernel.CurrentProcess()->GetHandleTable();
|
const auto& handle_table = kernel.CurrentProcess()->GetHandleTable();
|
||||||
|
|
||||||
|
@ -1750,9 +1748,9 @@ static void SignalProcessWideKey(Core::System& system, VAddr condition_variable_
|
||||||
// Only process up to 'target' threads, unless 'target' is less equal 0, in which case process
|
// Only process up to 'target' threads, unless 'target' is less equal 0, in which case process
|
||||||
// them all.
|
// them all.
|
||||||
std::size_t last = waiting_threads.size();
|
std::size_t last = waiting_threads.size();
|
||||||
if (target > 0)
|
if (target > 0) {
|
||||||
last = std::min(waiting_threads.size(), static_cast<std::size_t>(target));
|
last = std::min(waiting_threads.size(), static_cast<std::size_t>(target));
|
||||||
auto& time_manager = kernel.TimeManager();
|
}
|
||||||
for (std::size_t index = 0; index < last; ++index) {
|
for (std::size_t index = 0; index < last; ++index) {
|
||||||
auto& thread = waiting_threads[index];
|
auto& thread = waiting_threads[index];
|
||||||
|
|
||||||
|
@ -1763,7 +1761,6 @@ static void SignalProcessWideKey(Core::System& system, VAddr condition_variable_
|
||||||
|
|
||||||
const std::size_t current_core = system.CurrentCoreIndex();
|
const std::size_t current_core = system.CurrentCoreIndex();
|
||||||
auto& monitor = system.Monitor();
|
auto& monitor = system.Monitor();
|
||||||
auto& memory = system.Memory();
|
|
||||||
|
|
||||||
// Atomically read the value of the mutex.
|
// Atomically read the value of the mutex.
|
||||||
u32 mutex_val = 0;
|
u32 mutex_val = 0;
|
||||||
|
|
|
@ -19,7 +19,6 @@ Synchronization::Synchronization(Core::System& system) : system{system} {}
|
||||||
void Synchronization::SignalObject(SynchronizationObject& obj) const {
|
void Synchronization::SignalObject(SynchronizationObject& obj) const {
|
||||||
auto& kernel = system.Kernel();
|
auto& kernel = system.Kernel();
|
||||||
SchedulerLock lock(kernel);
|
SchedulerLock lock(kernel);
|
||||||
auto& time_manager = kernel.TimeManager();
|
|
||||||
if (obj.IsSignaled()) {
|
if (obj.IsSignaled()) {
|
||||||
for (auto thread : obj.GetWaitingThreads()) {
|
for (auto thread : obj.GetWaitingThreads()) {
|
||||||
if (thread->GetSchedulingStatus() == ThreadSchedStatus::Paused) {
|
if (thread->GetSchedulingStatus() == ThreadSchedStatus::Paused) {
|
||||||
|
|
Loading…
Reference in a new issue