From 47bddf56c2997d6d48f1c04229ec28385722a6a1 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Fri, 24 May 2013 18:43:56 +0000 Subject: [PATCH] Fix locks. git-svn-id: https://svn.dealii.org/trunk@29576 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/fe_q_base.cc | 8 ++++---- deal.II/source/fe/fe_system.cc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deal.II/source/fe/fe_q_base.cc b/deal.II/source/fe/fe_q_base.cc index 9705535b40..0e106d7c2e 100644 --- a/deal.II/source/fe/fe_q_base.cc +++ b/deal.II/source/fe/fe_q_base.cc @@ -1019,8 +1019,8 @@ FE_Q_Base Assert (child::n_children(refinement_case), ExcIndexRange(child,0,GeometryInfo::n_children(refinement_case))); - // needs initialization? - Threads::Mutex::ScopedLock(this->mutex); + // initialization upon first request + Threads::Mutex::ScopedLock lock(this->mutex); if (this->prolongation[refinement_case-1][child].n() == 0) { // distinguish q/q_dg0 case: only treat Q dofs first @@ -1188,8 +1188,8 @@ FE_Q_Base Assert (child::n_children(refinement_case), ExcIndexRange(child,0,GeometryInfo::n_children(refinement_case))); - // needs initialization? - Threads::Mutex::ScopedLock(this->mutex); + // initialization upon first request + Threads::Mutex::ScopedLock lock(this->mutex); if (this->restriction[refinement_case-1][child].n() == 0) { FullMatrix &restriction = diff --git a/deal.II/source/fe/fe_system.cc b/deal.II/source/fe/fe_system.cc index c3ecf56590..76c79d2b8e 100644 --- a/deal.II/source/fe/fe_system.cc +++ b/deal.II/source/fe/fe_system.cc @@ -603,8 +603,8 @@ FESystem Assert (child::n_children(refinement_case), ExcIndexRange(child,0,GeometryInfo::n_children(refinement_case))); - // needs initialization? - Threads::Mutex::ScopedLock(this->mutex); + // initialization upon first request + Threads::Mutex::ScopedLock lock(this->mutex); if (this->restriction[refinement_case-1][child].n() == 0) { // Check if some of the matrices of the base elements are void. @@ -685,8 +685,8 @@ FESystem Assert (child::n_children(refinement_case), ExcIndexRange(child,0,GeometryInfo::n_children(refinement_case))); - // needs initialization? - Threads::Mutex::ScopedLock(this->mutex); + // initialization upon first request + Threads::Mutex::ScopedLock lock(this->mutex); if (this->prolongation[refinement_case-1][child].n() == 0) { // Check if some of the matrices of the base elements are void. -- 2.39.5