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:
Marco Costalba
2011-08-10 12:12:10 +01:00
parent c386ce0023
commit d156e7a20b
3 changed files with 19 additions and 25 deletions

View File

@@ -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;