X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fthread.h;h=b476d529f4d3a1455e662958a8190a6094178870;hb=bbfe452f85929a938bda7fce9894f57659987919;hp=463739fe2eff7c39617ad66ee59953214731676a;hpb=c980163316d48ff304bfb253089c7d474d090b12;p=stockfish diff --git a/src/thread.h b/src/thread.h index 463739fe..b476d529 100644 --- a/src/thread.h +++ b/src/thread.h @@ -36,7 +36,7 @@ struct SplitPoint { SplitPoint* parent; const Position* pos; Depth depth; - bool pvNode, mateThreat; + bool pvNode; Value beta; int ply; int master; @@ -68,10 +68,19 @@ enum ThreadState }; 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)