From 83c648ffe9fdb8f87c0dec9997863bf2c65ad76b Mon Sep 17 00:00:00 2001 From: tchernobog Date: Sun, 17 Sep 2006 18:26:48 +0000 Subject: [PATCH] - Fix bug in scheduler not erasing the running thread from the ready queue, if it blocked because it immediately raised new unallocable (sub)requests. This made the value of "alive_threads" wrong. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1244 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/scheduler.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/scheduler.cc b/src/backend/scheduler.cc index 5d59398..e05d120 100644 --- a/src/backend/scheduler.cc +++ b/src/backend/scheduler.cc @@ -597,6 +597,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy& else { running_thread->set_last_release(current_instant); + _ready_queue->erase_first(); running_thread = NULL; alive_threads--; // Proceed to select a new running thread, below