From: Martin Kronbichler Date: Fri, 24 May 2013 18:43:56 +0000 (+0000) Subject: Fix locks. X-Git-Tag: v8.0.0~460 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9161dc8467a6c712c26f26f6a84bf6084cafd1f6;p=dealii.git Fix locks. git-svn-id: https://svn.dealii.org/trunk@29576 0785d39b-7218-0410-832d-ea1e28bc413d --- 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.