]> https://gitweb.dealii.org/ - dealii.git/commitdiff
replace some instances of Threads::Mutex with std::mutex 9242/head
authorReza Rastak <rastak@stanford.edu>
Tue, 7 Jan 2020 05:35:37 +0000 (21:35 -0800)
committerReza Rastak <rastak@stanford.edu>
Tue, 7 Jan 2020 05:45:59 +0000 (21:45 -0800)
include/deal.II/fe/fe_tools.templates.h
source/base/logstream.cc
source/base/polynomial.cc
source/base/polynomials_raviart_thomas.cc
source/base/polynomials_rt_bubbles.cc

index fd46f80cf40f90c8a58b0f5482cf3779b9181f51..926110a0ef7c87dc7987b3ca39e2955cbc2e8fe1 100644 (file)
@@ -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
index 4ed0dfb64a605c7e2c82156bf1902c312f154aeb..2129c4f6ea3dbb09924669d35a8b7d9042d0bb14 100644 (file)
@@ -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
 
 
index bff1f5c672841ea78014e6a466ffd35b01c03142..065997faac6c3333d1adf8b491b92d225a15e6e4 100644 (file)
@@ -39,7 +39,7 @@ DEAL_II_NAMESPACE_OPEN
 // more fine-grained solution
 namespace
 {
-  Threads::Mutex coefficients_lock;
+  std::mutex coefficients_lock;
 }
 
 
index 0affb59ff58f101abff61a6243207eda6f082ca1..ef9d2c4d3f6d91044ee6ea050259d6a386e19d41 100644 (file)
@@ -94,7 +94,7 @@ PolynomialsRaviartThomas<dim>::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<std::mutex> lock(mutex);
 
   static std::vector<double>         p_values;
index fcf74610e1adcdc7e4411dfb43714ba8c137c0bc..52a2cd727a355258eecf2175eb55233149cc99fc 100644 (file)
@@ -75,7 +75,7 @@ PolynomialsRT_Bubbles<dim>::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<std::mutex> lock(mutex);
 
     static std::vector<Tensor<1, dim>> p_values;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.