struct Thread {
- enum ThreadState
- {
- AVAILABLE, // Thread is waiting for work
- WORKISWAITING, // Master has ordered us to start searching
- SEARCHING // Thread is performing work
- };
-
void wake_up();
bool cutoff_occurred() const;
bool is_available_to(int master) const;
int maxPly;
Lock sleepLock;
WaitCondition sleepCond;
- volatile ThreadState state;
SplitPoint* volatile splitPoint;
volatile int activeSplitPoints;
+ volatile bool is_searching;
volatile bool do_sleep;
volatile bool do_terminate;