anevilyak+mmlr:

* scheduler_enqueue_in_runqueue() now allows the scheduler to return a hint as to whether a reschedule is desirable or not. This is used in a few other places in order to relegate scheduling decisions entirely to the scheduler rather than the priority hacks previously used. There are probably other places in the kernel that could now make use of that information to more intelligently call reschedule() though.
* Switch over the default scheduler to scheduler_affine().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32554 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2009-08-21 04:11:40 +00:00
parent e58f5f3d02
commit 009ccc2962
7 changed files with 18 additions and 23 deletions
+4 -8
View File
@@ -2275,14 +2275,10 @@ thread_block_timeout(timer* timer)
// easy.
struct thread* thread = (struct thread*)timer->user_data;
if (thread_unblock_locked(thread, B_TIMED_OUT)) {
// We actually woke up the thread. If it has a higher priority than the
// currently running thread, we invoke the scheduler.
// TODO: Is this really such a good idea or should we do that only when
// the woken up thread has realtime priority?
if (thread->priority > thread_get_current_thread()->priority)
return B_INVOKE_SCHEDULER;
}
// the scheduler will tell us whether to reschedule or not via
// thread_unblock_locked's return
if (thread_unblock_locked(thread, B_TIMED_OUT))
return B_INVOKE_SCHEDULER;
return B_HANDLED_INTERRUPT;
}