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
This commit is contained in:
Michael Lotz 2009-08-18 13:19:12 +00:00
parent f24f525737
commit 100487755f
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}