Browse Source

Remove unused mutexes from DepTree::thread_params.

template_comparator
Michael Uleysky 8 years ago
parent
commit
522a4b2092
  1. 2
      include/deptree.h
  2. 4
      src/deptree.cpp

2
include/deptree.h

@ -22,8 +22,6 @@ class DepTree
LeafVector leafs;
pthread_mutex_t leaf_mtx;
pthread_mutex_t root_mtx;
pthread_mutex_t vars_mtx;
pthread_mutex_t prsv_mtx;
pthread_mutex_t tree_mtx;
} thread_params;
NodeVector parents;

4
src/deptree.cpp

@ -500,8 +500,6 @@ int DepTree::EvaluateTree(unsigned int nthreads)
p.root=this;
pthread_mutex_init(&p.leaf_mtx,nullptr);
pthread_mutex_init(&p.root_mtx,nullptr);
pthread_mutex_init(&p.vars_mtx,nullptr);
pthread_mutex_init(&p.prsv_mtx,nullptr);
pthread_mutex_init(&p.tree_mtx,nullptr);
while(0!=p.root->parents.size()) p.root=*(p.root->parents.begin());
@ -511,8 +509,6 @@ int DepTree::EvaluateTree(unsigned int nthreads)
delete[] threads;
pthread_mutex_destroy(&p.leaf_mtx);
pthread_mutex_destroy(&p.root_mtx);
pthread_mutex_destroy(&p.vars_mtx);
pthread_mutex_destroy(&p.prsv_mtx);
pthread_mutex_destroy(&p.tree_mtx);
}
return p.exitcode;

Loading…
Cancel
Save