// particular we need to avoid a deadlock in case a master thread has,
// in the meanwhile, allocated us and sent the wake_up() call before we
// had the chance to grab the lock.
// particular we need to avoid a deadlock in case a master thread has,
// in the meanwhile, allocated us and sent the wake_up() call before we
// had the chance to grab the lock.
cond_wait(&sleepCond, &sleepLock);
lock_release(&sleepLock);
}
// If this thread has been assigned work, launch a search
cond_wait(&sleepCond, &sleepLock);
lock_release(&sleepLock);
}
// If this thread has been assigned work, launch a search
// Wake up master thread so to allow it to return from the idle loop in
// case we are the last slave of the split point.
if ( Threads.use_sleeping_threads()
&& threadID != tsp->master
// Wake up master thread so to allow it to return from the idle loop in
// case we are the last slave of the split point.
if ( Threads.use_sleeping_threads()
&& threadID != tsp->master