Lock MPLock;
Lock IOLock;
bool AllThreadsShouldExit = false;
- const int MaxActiveSplitPoints = 8; // FIXME, sync with UCI Option
- SplitPoint SplitPointStack[THREAD_MAX][MaxActiveSplitPoints];
+ SplitPoint SplitPointStack[THREAD_MAX][ACTIVE_SPLIT_POINTS_MAX];
bool Idle = true;
#if !defined(_MSC_VER)
void init_split_point_stack() {
for(int i = 0; i < THREAD_MAX; i++)
- for(int j = 0; j < MaxActiveSplitPoints; j++) {
+ for(int j = 0; j < ACTIVE_SPLIT_POINTS_MAX; j++) {
SplitPointStack[i][j].parent = NULL;
lock_init(&(SplitPointStack[i][j].lock), NULL);
}
void destroy_split_point_stack() {
for(int i = 0; i < THREAD_MAX; i++)
- for(int j = 0; j < MaxActiveSplitPoints; j++)
+ for(int j = 0; j < ACTIVE_SPLIT_POINTS_MAX; j++)
lock_destroy(&(SplitPointStack[i][j].lock));
}
// If no other thread is available to help us, or if we have too many
// active split points, don't split.
if(!idle_thread_exists(master) ||
- Threads[master].activeSplitPoints >= MaxActiveSplitPoints) {
+ Threads[master].activeSplitPoints >= ACTIVE_SPLIT_POINTS_MAX) {
lock_release(&MPLock);
return false;
}