1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 01:03:09 +00:00

Improved cutoff check when reparenting

Check for a cutoff occurred also high in
the tree and not only at current split
point.

This avoids some more wasted reparenting.

No functional chnage.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2012-04-16 14:19:22 +02:00
parent f59323b56a
commit 5392007a24

View file

@ -1871,7 +1871,7 @@ void Thread::idle_loop(SplitPoint* sp_master) {
// where we are available as a possible slave.
if ( this->is_available_to(th)
&& spCnt > 0
&& !latest->cutoff
&& !th->cutoff_occurred()
&& latest->slavesMask == latest->allSlavesMask
&& more_than_one(latest->allSlavesMask))
{
@ -1882,7 +1882,7 @@ void Thread::idle_loop(SplitPoint* sp_master) {
// of a race storm here !
if ( this->is_available_to(th)
&& spCnt == th->splitPointsCnt
&& !latest->cutoff
&& !th->cutoff_occurred()
&& latest->slavesMask == latest->allSlavesMask
&& more_than_one(latest->allSlavesMask))
{