* Replaced scheduler_remove_from_run_queue() by

scheduler_set_thread_priority(). Setting the thread priority was the
  only situation in which it was used.
* Renamed scheduler.cpp to scheduler_simple.cpp.
* The scheduler functions are no longer called directly. Instead there's
  an operation vector now, which is initialized at kernel init time.
  This allows for picking the most suitable scheduler for the machine
  (e.g. a non-SMP scheduler on a non-SMP machine).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28262 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-10-21 12:37:13 +00:00
parent 997c3d8afb
commit 53892c92a0
8 changed files with 452 additions and 386 deletions
+1 -8
View File
@@ -2523,14 +2523,7 @@ set_thread_priority(thread_id id, int32 priority)
thread = thread_get_thread_struct_locked(id);
if (thread) {
oldPriority = thread->priority;
thread->next_priority = priority;
if (thread->state == B_THREAD_READY && thread->priority != priority) {
// if the thread is in the run queue, we reinsert it at a new position
scheduler_remove_from_run_queue(thread);
thread->priority = priority;
scheduler_enqueue_in_run_queue(thread);
} else
thread->priority = priority;
scheduler_set_thread_priority(thread, priority);
} else
oldPriority = B_BAD_THREAD_ID;