if ( sp
&& sp->allSlavesSearching
&& sp->slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT
- && available_to(sp->master))
+ && can_join(sp))
{
assert(this != th);
assert(!(this_sp && this_sp->slavesMask.none()));
if ( sp->allSlavesSearching
&& sp->slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT
- && available_to(sp->master))
+ && can_join(sp))
{
sp->slavesMask.set(idx);
activeSplitPoint = sp;
}
// Avoid races with notify_one() fired from last slave of the split point
- std::unique_lock<std::mutex> lk(mutex);
+ std::unique_lock<Mutex> lk(mutex);
// If we are master and all slaves have finished then exit idle_loop
if (this_sp && this_sp->slavesMask.none())