Set the state directly to Thread::SEARCHING
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
}
// If this thread has been assigned work, launch a search
}
// If this thread has been assigned work, launch a search
- if (state == Thread::WORKISWAITING)
+ if (state == Thread::SEARCHING)
- state = Thread::SEARCHING;
-
// Copy split point position and search stack and call search()
SearchStack ss[PLY_MAX_PLUS_2];
SplitPoint* tsp = splitPoint;
// Copy split point position and search stack and call search()
SearchStack ss[PLY_MAX_PLUS_2];
SplitPoint* tsp = splitPoint;
threads[i].splitPoint = sp;
// This makes the slave to exit from idle_loop()
threads[i].splitPoint = sp;
// This makes the slave to exit from idle_loop()
- threads[i].state = Thread::WORKISWAITING;
+ threads[i].state = Thread::SEARCHING;
if (useSleepingThreads)
threads[i].wake_up();
if (useSleepingThreads)
threads[i].wake_up();
masterThread.splitPoint = sp;
masterThread.activeSplitPoints++;
masterThread.splitPoint = sp;
masterThread.activeSplitPoints++;
- masterThread.state = Thread::WORKISWAITING;
// Everything is set up. The master thread enters the idle loop, from
// which it will instantly launch a search, because its state is
// Everything is set up. The master thread enters the idle loop, from
// which it will instantly launch a search, because its state is
enum ThreadState
{
AVAILABLE, // Thread is waiting for work
enum ThreadState
{
AVAILABLE, // Thread is waiting for work
- WORKISWAITING, // Master has ordered us to start searching
SEARCHING // Thread is performing work
};
SEARCHING // Thread is performing work
};