From 522a4b2092af27363a5193e04da25a23a1b19560 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Sun, 21 Aug 2016 00:30:26 +1000 Subject: [PATCH] Remove unused mutexes from DepTree::thread_params. --- include/deptree.h | 2 -- src/deptree.cpp | 4 ---- 2 files changed, 6 deletions(-) diff --git a/include/deptree.h b/include/deptree.h index 5f0f52b..85b38fd 100644 --- a/include/deptree.h +++ b/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; diff --git a/src/deptree.cpp b/src/deptree.cpp index 8706b85..45fb619 100644 --- a/src/deptree.cpp +++ b/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;