pthread_t pthread[1];
#endif
- for (i = 0; i < THREAD_MAX; i++)
- Threads[i].activeSplitPoints = 0;
-
// Initialize global locks
lock_init(&MPLock, NULL);
lock_init(&IOLock, NULL);
// All threads except the main thread should be initialized to idle state
for (i = 1; i < THREAD_MAX; i++)
- {
- Threads[i].stop = false;
- Threads[i].workIsWaiting = false;
Threads[i].idle = true;
- Threads[i].running = false;
- }
// Launch the helper threads
for (i = 1; i < THREAD_MAX; i++)
//// Includes
////
+#include <cstring>
+
#include "lock.h"
#include "movepick.h"
#include "position.h"
struct Thread {
+
+ Thread() { memset(this, 0, sizeof(Thread)); }
+
SplitPoint *splitPoint;
volatile int activeSplitPoints;
uint64_t nodes;