#include "position.h"
#include "search.h"
-const int MAX_THREADS = 16;
+const int MAX_THREADS = 32;
const int MAX_ACTIVE_SPLIT_POINTS = 8;
struct SplitPoint {
SplitPoint* parent;
const Position* pos;
Depth depth;
- bool pvNode, mateThreat;
+ bool pvNode;
Value beta;
int ply;
int master;
};
struct Thread {
+ int maxPly;
+ Lock sleepLock;
+ WaitCondition sleepCond;
volatile ThreadState state;
SplitPoint* volatile splitPoint;
volatile int activeSplitPoints;
SplitPoint splitPoints[MAX_ACTIVE_SPLIT_POINTS];
+
+ void wake_up() {
+ lock_grab(&sleepLock);
+ cond_signal(&sleepCond);
+ lock_release(&sleepLock);
+ }
};
#endif // !defined(THREAD_H_INCLUDED)