X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fthread.h;h=b476d529f4d3a1455e662958a8190a6094178870;hb=bbfe452f85929a938bda7fce9894f57659987919;hp=609b2e609687a9e1cafb1952aef2d0c7dd96a4cc;hpb=0fcda095df1caa860e8e3f3a714d5545ec9dc122;p=stockfish diff --git a/src/thread.h b/src/thread.h index 609b2e60..b476d529 100644 --- a/src/thread.h +++ b/src/thread.h @@ -27,7 +27,7 @@ #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 { @@ -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)