From 100487755f607302bb04e99dba6ab57ade773f1e Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 18 Aug 2009 13:19:12 +0000 Subject: [PATCH] We explicitly remove the thread from the (priority sorted) run queue to re-insert it at a new place, but by only setting the priority and not the next_priority field, the thread would actually be enqueued at the same priority level as before. Didn't cause any real damage, guess it was just an oversight. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32494 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/scheduler/scheduler_affine.cpp | 2 +- src/system/kernel/scheduler/scheduler_simple.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/scheduler/scheduler_affine.cpp b/src/system/kernel/scheduler/scheduler_affine.cpp index 34e996cac8..84d0ea6b6f 100644 --- a/src/system/kernel/scheduler/scheduler_affine.cpp +++ b/src/system/kernel/scheduler/scheduler_affine.cpp @@ -331,7 +331,7 @@ affine_set_thread_priority(struct thread *thread, int32 priority) thread = dequeue_from_run_queue(prev, targetCPU); // set priority and re-insert - thread->priority = priority; + thread->priority = thread->next_priority = priority; affine_enqueue_in_run_queue(thread); } diff --git a/src/system/kernel/scheduler/scheduler_simple.cpp b/src/system/kernel/scheduler/scheduler_simple.cpp index f7d4e1acc5..e8b537adf6 100644 --- a/src/system/kernel/scheduler/scheduler_simple.cpp +++ b/src/system/kernel/scheduler/scheduler_simple.cpp @@ -195,7 +195,7 @@ simple_set_thread_priority(struct thread *thread, int32 priority) sRunQueue = item->queue_next; // set priority and re-insert - thread->priority = priority; + thread->priority = thread->next_priority = priority; simple_enqueue_in_run_queue(thread); }