- 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:
parent
0520169288
commit
35451bddbd
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue