simple_enqueue_in_run_queue(): Between having found the insertion point and
manipulating the queue is a particularly unsuitable place for calling the listeners, as they wouldn't be allowed to e.g. unblock threads, since that would screw the run queue. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30338 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9a597aaebd
commit
4a559f388b
@ -101,12 +101,6 @@ simple_enqueue_in_run_queue(struct thread *thread)
|
||||
|
||||
T(EnqueueThread(thread, prev, curr));
|
||||
|
||||
// notify listeners
|
||||
for (SchedulerListenerList::Iterator it = gSchedulerListeners.GetIterator();
|
||||
SchedulerListener* listener = it.Next();) {
|
||||
listener->ThreadEnqueuedInRunQueue(thread);
|
||||
}
|
||||
|
||||
thread->queue_next = curr;
|
||||
if (prev)
|
||||
prev->queue_next = thread;
|
||||
@ -151,6 +145,12 @@ simple_enqueue_in_run_queue(struct thread *thread)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// notify listeners
|
||||
for (SchedulerListenerList::Iterator it = gSchedulerListeners.GetIterator();
|
||||
SchedulerListener* listener = it.Next();) {
|
||||
listener->ThreadEnqueuedInRunQueue(thread);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user