X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fthread.h;h=e6a4cf95744ca0260f2ae11fd7c58aa7a1dae169;hb=d11a52990459601e46e02a8759616737dc045f74;hp=4b712076083b701ee23183e9a352d0ecfc2b6da6;hpb=c483ffc773c012b49f4ea2f5bd1d788c1f0dc4ac;p=stockfish diff --git a/src/thread.h b/src/thread.h index 4b712076..e6a4cf95 100644 --- a/src/thread.h +++ b/src/thread.h @@ -47,7 +47,6 @@ struct SplitPoint { MovePicker* mp; SplitPoint* parent; - // Shared data Lock lock; volatile uint64_t slavesMask; @@ -112,22 +111,22 @@ class ThreadsManager { static storage duration are automatically set to zero before enter main() */ public: - void init(); - void exit(); + void init(); // No c'tor becuase Threads is static and we need stuff initialized + ~ThreadsManager(); Thread& operator[](int id) { return *threads[id]; } bool use_sleeping_threads() const { return useSleepingThreads; } int min_split_depth() const { return minimumSplitDepth; } int size() const { return (int)threads.size(); } - void wake_up(); - void sleep(); + void wake_up() const; + void sleep() const; void read_uci_options(); bool available_slave_exists(int master) const; void set_timer(int msec); - void stop_thinking(); - void start_thinking(const Position& pos, const Search::LimitsType& limits, - const std::set& = std::set(), bool async = false); + void wait_for_search_finished(); + void start_searching(const Position& pos, const Search::LimitsType& limits, + const std::set& = std::set(), bool async = false); template Value split(Position& pos, Search::Stack* ss, Value alpha, Value beta, Value bestValue, Move* bestMove,