]> git.sesse.net Git - stockfish/blobdiff - src/thread.h
Fix endless reaparenting loop
[stockfish] / src / thread.h
index c39c6e695e9fc7947a9b3a89fb7aad655c61e5d9..9f0bb24add83bff8457c214e98c63af8a9c11210 100644 (file)
@@ -57,6 +57,7 @@ struct SplitPoint {
   volatile Move bestMove;
   volatile int moveCount;
   volatile bool cutoff;
+  volatile bool allSlavesRunning;
 };
 
 
@@ -119,9 +120,7 @@ public:
   bool use_sleeping_threads() const { return useSleepingThreads; }
   int min_split_depth() const { return minimumSplitDepth; }
   int size() const { return (int)threads.size(); }
-  Thread* main_thread() const { return threads[0]; }
-  Thread* this_thread() const { return (Thread*)tls_get(tlsKey); }
-  void set_this_thread(Thread* th) const { tls_set(tlsKey, th); }
+  Thread* main_thread() { return threads[0]; }
 
   void wake_up() const;
   void sleep() const;
@@ -140,7 +139,6 @@ private:
 
   std::vector<Thread*> threads;
   Thread* timer;
-  ThreadLocalStorageKey tlsKey;
   Lock splitLock;
   WaitCondition sleepCond;
   Depth minimumSplitDepth;