From: Wolfgang Bangerth Date: Mon, 23 Oct 2023 12:49:29 +0000 (-0600) Subject: Split a mutex into two, give them better names. X-Git-Tag: relicensing~367^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d6f3dce8dd212ad1b64490fa1f1145f11de42cf;p=dealii.git Split a mutex into two, give them better names. --- diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index 7abb98633f..c3cb16fa4a 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -1332,9 +1332,11 @@ private: }; /** - * Mutex for protecting initialization of restriction and embedding matrix. + * Mutex variables used for protecting the initialization of restriction + * and embedding matrices. */ - mutable std::mutex mutex; + mutable std::mutex restriction_matrix_mutex; + mutable std::mutex prolongation_matrix_mutex; friend class FE_Enriched; }; diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 5759b45936..ecfc46d598 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -898,7 +898,7 @@ FESystem::get_restriction_matrix( // initialization upon first request if (this->restriction[refinement_case - 1][child].n() == 0) { - std::lock_guard lock(this->mutex); + std::lock_guard lock(restriction_matrix_mutex); // check if updated while waiting for lock if (this->restriction[refinement_case - 1][child].n() == @@ -990,7 +990,7 @@ FESystem::get_prolongation_matrix( // restriction matrix if (this->prolongation[refinement_case - 1][child].n() == 0) { - std::lock_guard lock(this->mutex); + std::lock_guard lock(prolongation_matrix_mutex); if (this->prolongation[refinement_case - 1][child].n() == this->n_dofs_per_cell())