-extern void init_search();
-extern int64_t perft(Position& pos, Depth depth);
-extern void think();
-extern void uci_async_command(const std::string& cmd);
-extern void do_timer_event();
+/// The SignalsType struct stores volatile flags updated during the search
+/// typically in an async fashion e.g. to stop the search by the GUI.
+
+struct SignalsType {
+ bool stop, stopOnPonderhit, firstRootMove, failedLowAtRoot;
+};
+
+typedef std::auto_ptr<std::stack<StateInfo> > StateStackPtr;
+
+extern volatile SignalsType Signals;
+extern LimitsType Limits;
+extern std::vector<RootMove> RootMoves;
+extern Position RootPos;
+extern Time::point SearchTime;
+extern StateStackPtr SetupStates;
+
+void init();
+void think();
+template<bool Root> uint64_t perft(Position& pos, Depth depth);
+
+} // namespace Search