kernel/scheduler: Remove unused parameter to AddThread()

This was made unused in b404fcdf14, but
the parameter itself wasn't removed.
This commit is contained in:
Lioncash 2019-03-30 05:26:38 -04:00
parent cb805f45ae
commit 824b8e4086
3 changed files with 4 additions and 4 deletions

View file

@ -148,7 +148,7 @@ void Scheduler::Reschedule() {
SwitchContext(next); SwitchContext(next);
} }
void Scheduler::AddThread(SharedPtr<Thread> thread, u32 priority) { void Scheduler::AddThread(SharedPtr<Thread> thread) {
std::lock_guard lock{scheduler_mutex}; std::lock_guard lock{scheduler_mutex};
thread_list.push_back(std::move(thread)); thread_list.push_back(std::move(thread));

View file

@ -38,7 +38,7 @@ public:
u64 GetLastContextSwitchTicks() const; u64 GetLastContextSwitchTicks() const;
/// Adds a new thread to the scheduler /// Adds a new thread to the scheduler
void AddThread(SharedPtr<Thread> thread, u32 priority); void AddThread(SharedPtr<Thread> thread);
/// Removes a thread from the scheduler /// Removes a thread from the scheduler
void RemoveThread(Thread* thread); void RemoveThread(Thread* thread);

View file

@ -199,7 +199,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(KernelCore& kernel, std::string name
thread->callback_handle = kernel.ThreadWakeupCallbackHandleTable().Create(thread).Unwrap(); thread->callback_handle = kernel.ThreadWakeupCallbackHandleTable().Create(thread).Unwrap();
thread->owner_process = &owner_process; thread->owner_process = &owner_process;
thread->scheduler = &system.Scheduler(processor_id); thread->scheduler = &system.Scheduler(processor_id);
thread->scheduler->AddThread(thread, priority); thread->scheduler->AddThread(thread);
thread->tls_address = thread->owner_process->MarkNextAvailableTLSSlotAsUsed(*thread); thread->tls_address = thread->owner_process->MarkNextAvailableTLSSlotAsUsed(*thread);
// TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used
@ -352,7 +352,7 @@ void Thread::ChangeScheduler() {
if (*new_processor_id != processor_id) { if (*new_processor_id != processor_id) {
// Remove thread from previous core's scheduler // Remove thread from previous core's scheduler
scheduler->RemoveThread(this); scheduler->RemoveThread(this);
next_scheduler.AddThread(this, current_priority); next_scheduler.AddThread(this);
} }
processor_id = *new_processor_id; processor_id = *new_processor_id;