From: Reza Rastak Date: Tue, 7 Jan 2020 05:35:37 +0000 (-0800) Subject: replace some instances of Threads::Mutex with std::mutex X-Git-Tag: v9.2.0-rc1~721^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d8a300c91054b9bbc1ff9fab68eb8452ee83c89;p=dealii.git replace some instances of Threads::Mutex with std::mutex --- diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index fd46f80cf4..926110a0ef 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1280,11 +1280,11 @@ namespace FETools // and accessing the fe_name_map variable. make this lock local to // this file. // - // this and the next variable are declared static (even though - // they're in an anonymous namespace) in order to make icc happy + // This variable is declared static (even though + // it belongs to an internal namespace) in order to make icc happy // (which otherwise reports a multiply defined symbol when linking - // libraries for more than one space dimension together - static Threads::Mutex fe_name_map_lock; + // libraries for more than one space dimension together) + static std::mutex fe_name_map_lock; // This is the map used by FETools::get_fe_by_name and // FETools::add_fe_name. It is only accessed by functions in this diff --git a/source/base/logstream.cc b/source/base/logstream.cc index 4ed0dfb64a..2129c4f6ea 100644 --- a/source/base/logstream.cc +++ b/source/base/logstream.cc @@ -28,8 +28,8 @@ DEAL_II_NAMESPACE_OPEN namespace { - Threads::Mutex log_lock; - Threads::Mutex write_lock; + std::mutex log_lock; + std::mutex write_lock; } // namespace diff --git a/source/base/polynomial.cc b/source/base/polynomial.cc index bff1f5c672..065997faac 100644 --- a/source/base/polynomial.cc +++ b/source/base/polynomial.cc @@ -39,7 +39,7 @@ DEAL_II_NAMESPACE_OPEN // more fine-grained solution namespace { - Threads::Mutex coefficients_lock; + std::mutex coefficients_lock; } diff --git a/source/base/polynomials_raviart_thomas.cc b/source/base/polynomials_raviart_thomas.cc index 0affb59ff5..ef9d2c4d3f 100644 --- a/source/base/polynomials_raviart_thomas.cc +++ b/source/base/polynomials_raviart_thomas.cc @@ -94,7 +94,7 @@ PolynomialsRaviartThomas::evaluate( // deal.II/create_mass_matrix_05) // will start to produce random // results in multithread mode - static Threads::Mutex mutex; + static std::mutex mutex; std::lock_guard lock(mutex); static std::vector p_values; diff --git a/source/base/polynomials_rt_bubbles.cc b/source/base/polynomials_rt_bubbles.cc index fcf74610e1..52a2cd727a 100644 --- a/source/base/polynomials_rt_bubbles.cc +++ b/source/base/polynomials_rt_bubbles.cc @@ -75,7 +75,7 @@ PolynomialsRT_Bubbles::evaluate( // using a mutex to make sure they are not used by multiple threads // at once { - static Threads::Mutex mutex; + static std::mutex mutex; std::lock_guard lock(mutex); static std::vector> p_values;