- Fix all policies to ensure that the sort *IS* stable

- Erase the newly selected running thread from the ready queue
as per Marco feedback (or so I believe to have understood...)


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1024 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-06 13:04:31 +00:00
parent df4b1b4205
commit dbfc7393ed
5 changed files with 9 additions and 7 deletions

View file

@ -634,6 +634,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
{
// Fix fields of running thread
DynamicThread& new_running = (DynamicThread&) _ready_queue->get_item_at(0);
_ready_queue->erase_first();
new_running.set_state(Schedulable::state_running);
// If the new running is different from the old one,