-// wake_up() is called before a new search to start the threads that are waiting
-// on the sleep condition and to reset maxPly. When useSleepingThreads is set
-// threads will be woken up at split time.
-
-void ThreadsManager::wake_up() const {
-
- for (int i = 0; i < size(); i++)
- {
- threads[i]->do_sleep = false;
- threads[i]->maxPly = 0;
-
- if (!useSleepingThreads)
- threads[i]->wake_up();
- }
-}
-
-
-// sleep() is called after the search finishes to ask all the threads but the
-// main one to go waiting on a sleep condition.
-
-void ThreadsManager::sleep() const {
-
- for (int i = 1; i < size(); i++) // Main thread will go to sleep by itself
- threads[i]->do_sleep = true; // to avoid a race with start_thinking()
-}
-
-
-// available_slave_exists() tries to find an idle thread which is available as
-// a slave for the thread with threadID 'master'.
-
-bool ThreadsManager::available_slave_exists(int master) const {
+// slave_available() tries to find an idle thread which is available as a slave
+// for the thread 'master'.