]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use std::mutex functions instead of the names in Threads::Mutex.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 27 Sep 2018 13:55:24 +0000 (07:55 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 27 Sep 2018 14:02:08 +0000 (08:02 -0600)
include/deal.II/lac/swappable_vector.templates.h
source/base/polynomial.cc

index 5b109df84a180228980a730aefae76eb7a525187..133edcdb73454427baf42933ce320d52261f3585 100644 (file)
@@ -131,7 +131,7 @@ SwappableVector<number>::reload()
   // possibly existing @p alert
   // calls. if not in MT mode, this
   // is a no-op
-  lock.acquire();
+  lock.lock();
 
   // if data was already preloaded,
   // then there is no more need to
@@ -150,8 +150,8 @@ SwappableVector<number>::reload()
       // release lock. the lock is
       // also released in the other
       // branch of the if-clause
-      lock.release();
-    };
+      lock.unlock();
+    }
 }
 
 
@@ -169,7 +169,7 @@ SwappableVector<number>::alert()
   // synchronize with possible other
   // invocations of this function and
   // other functions in this class
-  lock.acquire();
+  lock.lock();
 
   // calling this function multiple
   // times does no harm:
@@ -178,7 +178,7 @@ SwappableVector<number>::alert()
       // vector is active does no harm
       // either
       (this->size() != 0))
-    lock.release();
+    lock.unlock();
   else
     // data has not been preloaded so
     // far, so go on! For this, start
@@ -210,7 +210,7 @@ SwappableVector<number>::reload_vector(const bool set_flag)
   // set the flag if so required
   if (set_flag)
     data_is_preloaded = true;
-  lock.release();
+  lock.unlock();
 #endif
 }
 
index eca63433ca866aa42d56265162ed92e9b68905ce..f02f1a16089621b34f850d21b8d03f9c5e320a64 100644 (file)
@@ -1066,9 +1066,9 @@ namespace Polynomials
           }
         else if (k == 2)
           {
-            coefficients_lock.release();
+            coefficients_lock.unlock();
             compute_coefficients(1);
-            coefficients_lock.acquire();
+            coefficients_lock.lock();
 
             std::vector<double> c2(3);
 
@@ -1091,9 +1091,9 @@ namespace Polynomials
             // allow the called
             // function to acquire it
             // itself
-            coefficients_lock.release();
+            coefficients_lock.unlock();
             compute_coefficients(k - 1);
-            coefficients_lock.acquire();
+            coefficients_lock.lock();
 
             std::vector<double> ck(k + 1);
 

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.