X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.h;h=740063b9a59c5d4ff1c4db19bd18416ac4b32e58;hp=c7abb9dcfd97a2b5b47b87f798fc4e5718cd2bb7;hb=00d9e9fd283b31e63389af091b158dbc3fedfc0e;hpb=3428a2875197c805c25fdd954ba3a24d00845a2a diff --git a/src/search.h b/src/search.h index c7abb9dc..740063b9 100644 --- a/src/search.h +++ b/src/search.h @@ -20,7 +20,8 @@ #ifndef SEARCH_H_INCLUDED #define SEARCH_H_INCLUDED -#include // For std::auto_ptr +#include +#include // For std::unique_ptr #include #include @@ -91,16 +92,16 @@ struct LimitsType { TimePoint startTime; }; -/// The SignalsType struct stores volatile flags updated during the search +/// The SignalsType struct stores atomic 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; + std::atomic stop, stopOnPonderhit, firstRootMove, failedLowAtRoot; }; typedef std::unique_ptr> StateStackPtr; -extern volatile SignalsType Signals; +extern SignalsType Signals; extern LimitsType Limits; extern StateStackPtr SetupStates;