- 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
This commit is contained in:
tchernobog 2006-08-28 22:59:51 +00:00
parent 0520169288
commit 35451bddbd
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
// for this check, since processes' state is based upon threads' one) // for this check, since processes' state is based upon threads' one)
Schedulable::state cur_state = current.get_state(); Schedulable::state cur_state = current.get_state();
if ((cur_state & (Schedulable::state_blocked | Schedulable::state_terminated)) == 0 && 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++; alive_threads++;
} }