mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Use a boolean instead as thread's state
Now that we have just two mutually exclusive thread's states we can repleace them by a simple boolean. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -65,12 +65,6 @@ struct SplitPoint {
|
||||
|
||||
struct Thread {
|
||||
|
||||
enum ThreadState
|
||||
{
|
||||
AVAILABLE, // Thread is waiting for work
|
||||
SEARCHING // Thread is performing work
|
||||
};
|
||||
|
||||
void wake_up();
|
||||
bool cutoff_occurred() const;
|
||||
bool is_available_to(int master) const;
|
||||
@@ -83,9 +77,9 @@ struct Thread {
|
||||
int maxPly;
|
||||
Lock sleepLock;
|
||||
WaitCondition sleepCond;
|
||||
volatile ThreadState state;
|
||||
SplitPoint* volatile splitPoint;
|
||||
volatile int activeSplitPoints;
|
||||
volatile bool is_searching;
|
||||
volatile bool do_sleep;
|
||||
volatile bool do_terminate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user