- if (bestSp)
- {
- sp = bestSp;
-
- // Recheck the conditions under lock protection
- Threads.mutex.lock();
- sp->mutex.lock();
-
- if ( sp->allSlavesSearching
- && sp->slavesCount < MAX_SLAVES_PER_SPLITPOINT
- && available_to(Threads[bestThread]))
- {
- sp->slavesMask.set(idx);
- sp->slavesCount++;
- activeSplitPoint = sp;
- searching = true;
- }