From 35451bddbd44d4a1f939908939b49a729e68de28 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Mon, 28 Aug 2006 22:59:51 +0000 Subject: [PATCH] - Hopefully a more complete fix. - TODO: write a test for this both in the case of the parent process having a "hole" between threads and being a) terminated, and b) blocked git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@960 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/scheduler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/scheduler.cc b/src/backend/scheduler.cc index d47057c..7fa3ffb 100644 --- a/src/backend/scheduler.cc +++ b/src/backend/scheduler.cc @@ -449,7 +449,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy& // for this check, since processes' state is based upon threads' one) Schedulable::state cur_state = current.get_state(); if ((cur_state & (Schedulable::state_blocked | Schedulable::state_terminated)) == 0 && - (current.get_process().get_state() != Schedulable::state_terminated)) // check for holes + (current.get_process().get_state() & (Schedulable::state_terminated | Schedulable::state_blocked)) == 0) // check for holes { alive_threads++; }