]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated classes Threads::ThreadCondition and Threads::ThreadMutex.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 30 Dec 2014 03:23:12 +0000 (21:23 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 4 Jan 2015 21:13:44 +0000 (15:13 -0600)
doc/news/changes.h
include/deal.II/base/thread_management.h
tests/base/mutex_01.cc
tests/benchmarks/old/spec2006-447.dealII.cc
tests/bits/step-13.cc
tests/bits/step-14.cc
tests/fail/hp-step-14.cc
tests/hp/step-13.cc

index a7fffb0623f3e6011fa8baf7d4c65439cf3185ec..7ab87361e945f82d3a5152a084d87f4363ea81e6 100644 (file)
@@ -54,6 +54,7 @@ inconvenience this causes.
     MGSmootherPrecondition that take a VectorMemory object.
   - Deprecated variants of MeshWorker::loop and MeshWorker::integration_loop.
   - ThreadManagement::spawn.
+  - Threads::ThreadCondition and Threads::ThreadMutex.
 </ol>
 
   <li> Removed: The config.h file no longer exports HAVE_* definitions.
index 6dd5483a59d66a60964b07c3858dc923296ef157..c8d7afd1288394de428780271048bba1443a2e17 100644 (file)
@@ -436,24 +436,6 @@ namespace Threads
   };
 
 
-  /**
-   * Provide a backward compatible name (we used ThreadMutex up to release
-   * 6.1, but since it is already in a namespace Threads this seems
-   * redundant).
-   *
-   * @deprecated
-   */
-  typedef Mutex ThreadMutex DEAL_II_DEPRECATED;
-
-  /**
-   * Provide a backward compatible name (we used ThreadCondition up to release
-   * 6.1, but since it is already in a namespace Threads this seems
-   * redundant).
-   *
-   * @deprecated
-   */
-  typedef ConditionVariable ThreadCondition DEAL_II_DEPRECATED;
-
   /**
    * If using POSIX functions, then alias the POSIX wrapper classes to the
    * names we use throughout the library.
@@ -467,7 +449,6 @@ namespace Threads
    * objects. Likewise for the barrier class.
    */
   typedef DummyThreadMutex     Mutex;
-  typedef DummyThreadMutex     ThreadMutex;
 
   /**
    * In non-multithread mode, the mutex and thread management classes are
@@ -475,7 +456,6 @@ namespace Threads
    * objects. Likewise for the barrier class.
    */
   typedef DummyThreadCondition ConditionVariable;
-  typedef DummyThreadCondition ThreadCondition;
 
   /**
    * In non-multithread mode, the mutex and thread management classes are
index cac67b4091662c936d3b72f500c3721f02913f0a..8c4adc8d8bf11fb715f72518b2a0e1e131930158 100644 (file)
@@ -24,7 +24,7 @@
 #include <deal.II/base/thread_management.h>
 
 
-Threads::ThreadMutex mutex;
+Threads::Mutex mutex;
 
 
 void test ()
index ecaa901f06103dc2dbf9a4df706a79a4434a4283..f009095a5be70b62695d117d30f7b5e924bba777 100644 (file)
@@ -644,7 +644,7 @@ namespace LaplaceSolver
     assemble_matrix (LinearSystem                                         &linear_system,
                      const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
                      const typename DoFHandler<dim>::active_cell_iterator &end_cell,
-                     Threads::ThreadMutex                                 &mutex) const;
+                     Threads::Mutex                                 &mutex) const;
   };
 
 
@@ -717,7 +717,7 @@ namespace LaplaceSolver
                                                     dof_handler.end (),
                                                     n_threads);
 
-    Threads::ThreadMutex mutex;
+    Threads::Mutex mutex;
     Threads::ThreadGroup<> threads;
     for (unsigned int thread=0; thread<n_threads; ++thread)
       threads += Threads::new_thread (&Solver<dim>::assemble_matrix, *this, 
@@ -750,7 +750,7 @@ namespace LaplaceSolver
   Solver<dim>::assemble_matrix (LinearSystem                                         &linear_system,
                                 const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
                                 const typename DoFHandler<dim>::active_cell_iterator &end_cell,
-                                Threads::ThreadMutex                                 &mutex) const
+                                Threads::Mutex                                 &mutex) const
   {
     MappingQ<dim> mapping (4);
     FEValues<dim> fe_values (mapping, *fe, *quadrature,
@@ -797,7 +797,7 @@ namespace LaplaceSolver
 
 
         cell->get_dof_indices (local_dof_indices);
-        Threads::ThreadMutex::ScopedLock lock (mutex);
+        Threads::Mutex::ScopedLock lock (mutex);
         for (unsigned int i=0; i<dofs_per_cell; ++i)
           for (unsigned int j=0; j<dofs_per_cell; ++j)
             linear_system.matrix.add (local_dof_indices[i],
index b28d2bfc167f188d78b8e622f547b9888bd7fcf8..f35d768a69a061777effd8e019c316104710c24f 100644 (file)
@@ -293,7 +293,7 @@ namespace LaplaceSolver
     assemble_matrix (LinearSystem                                         &linear_system,
                      const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
                      const typename DoFHandler<dim>::active_cell_iterator &end_cell,
-                     Threads::ThreadMutex                                 &mutex) const;
+                     Threads::Mutex                                 &mutex) const;
   };
 
 
@@ -364,7 +364,7 @@ namespace LaplaceSolver
                                                     dof_handler.end (),
                                                     n_threads);
 
-    Threads::ThreadMutex mutex;
+    Threads::Mutex mutex;
     Threads::ThreadGroup<> threads;
     for (unsigned int thread=0; thread<n_threads; ++thread)
       threads += Threads::new_thread (&Solver<dim>::assemble_matrix, *this,
@@ -399,7 +399,7 @@ namespace LaplaceSolver
   Solver<dim>::assemble_matrix (LinearSystem                                         &linear_system,
                                 const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
                                 const typename DoFHandler<dim>::active_cell_iterator &end_cell,
-                                Threads::ThreadMutex                                 &mutex) const
+                                Threads::Mutex                                 &mutex) const
   {
     FEValues<dim> fe_values (*fe, *quadrature,
                              update_gradients | update_JxW_values);
@@ -428,7 +428,7 @@ namespace LaplaceSolver
 
         cell->get_dof_indices (local_dof_indices);
 
-        Threads::ThreadMutex::ScopedLock lock (mutex);
+        Threads::Mutex::ScopedLock lock (mutex);
         for (unsigned int i=0; i<dofs_per_cell; ++i)
           for (unsigned int j=0; j<dofs_per_cell; ++j)
             linear_system.matrix.add (local_dof_indices[i],
index 29333cff1a36c73035ef0acb7d5cb8e4d1d5559f..971766a8bc88618a2f6694d32de7c7b6c87aceb4 100644 (file)
@@ -377,7 +377,7 @@ namespace LaplaceSolver
     assemble_matrix (LinearSystem                                         &linear_system,
                      const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
                      const typename DoFHandler<dim>::active_cell_iterator &end_cell,
-                     Threads::ThreadMutex                                 &mutex) const;
+                     Threads::Mutex                                 &mutex) const;
   };
 
 
@@ -451,7 +451,7 @@ namespace LaplaceSolver
                                                     n_threads);
 
     {
-      Threads::ThreadMutex mutex;
+      Threads::Mutex mutex;
       for (unsigned int thread=0; thread<n_threads; ++thread)
         {
           assemble_matrix
@@ -485,7 +485,7 @@ namespace LaplaceSolver
   Solver<dim>::assemble_matrix (LinearSystem                                         &linear_system,
                                 const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
                                 const typename DoFHandler<dim>::active_cell_iterator &end_cell,
-                                Threads::ThreadMutex                                 &mutex) const
+                                Threads::Mutex                                 &mutex) const
   {
     FEValues<dim> fe_values (*fe, *quadrature,
                              update_gradients | update_JxW_values);
@@ -513,7 +513,7 @@ namespace LaplaceSolver
 
 
         cell->get_dof_indices (local_dof_indices);
-        Threads::ThreadMutex::ScopedLock lock (mutex);
+        Threads::Mutex::ScopedLock lock (mutex);
         for (unsigned int i=0; i<dofs_per_cell; ++i)
           for (unsigned int j=0; j<dofs_per_cell; ++j)
             linear_system.matrix.add (local_dof_indices[i],
index 981d7894914b9768d7d6c254afaccb9c21fdff45..bf1eafc8f847378d5404199b9cd4bbaf09049117 100644 (file)
@@ -377,7 +377,7 @@ namespace LaplaceSolver
     assemble_matrix (LinearSystem                                         &linear_system,
                      const typename hp::DoFHandler<dim>::active_cell_iterator &begin_cell,
                      const typename hp::DoFHandler<dim>::active_cell_iterator &end_cell,
-                     Threads::ThreadMutex                                 &mutex) const;
+                     Threads::Mutex                                 &mutex) const;
   };
 
 
@@ -450,7 +450,7 @@ namespace LaplaceSolver
                                                     dof_handler.end (),
                                                     n_threads);
 
-    Threads::ThreadMutex mutex;
+    Threads::Mutex mutex;
     Threads::ThreadGroup<> threads;
     for (unsigned int thread=0; thread<n_threads; ++thread)
       threads += Threads::new_thread (&Solver<dim>::assemble_matrix, *this, 
@@ -483,7 +483,7 @@ namespace LaplaceSolver
   Solver<dim>::assemble_matrix (LinearSystem                                         &linear_system,
                                 const typename hp::DoFHandler<dim>::active_cell_iterator &begin_cell,
                                 const typename hp::DoFHandler<dim>::active_cell_iterator &end_cell,
-                                Threads::ThreadMutex                                 &mutex) const
+                                Threads::Mutex                                 &mutex) const
   {
     hp::FEValues<dim> fe_values (*fe, *quadrature,
                                  update_gradients | update_JxW_values);
@@ -511,7 +511,7 @@ namespace LaplaceSolver
 
 
         cell->get_dof_indices (local_dof_indices);
-        Threads::ThreadMutex::ScopedLock lock (mutex);
+        Threads::Mutex::ScopedLock lock (mutex);
         for (unsigned int i=0; i<dofs_per_cell; ++i)
           for (unsigned int j=0; j<dofs_per_cell; ++j)
             linear_system.matrix.add (local_dof_indices[i],
index c8937022f98bf3ee913dbf66513a27b8e90e3243..7394ae86e181d626af4b1a43fa7d14fdc1121e29 100644 (file)
@@ -293,7 +293,7 @@ namespace LaplaceSolver
     assemble_matrix (LinearSystem                                         &linear_system,
                      const typename hp::DoFHandler<dim>::active_cell_iterator &begin_cell,
                      const typename hp::DoFHandler<dim>::active_cell_iterator &end_cell,
-                     Threads::ThreadMutex                                 &mutex) const;
+                     Threads::Mutex                                 &mutex) const;
   };
 
 
@@ -364,7 +364,7 @@ namespace LaplaceSolver
                                                     dof_handler.end (),
                                                     n_threads);
 
-    Threads::ThreadMutex mutex;
+    Threads::Mutex mutex;
     Threads::ThreadGroup<> threads;
     for (unsigned int thread=0; thread<n_threads; ++thread)
       threads += Threads::new_thread (&Solver<dim>::assemble_matrix, *this,
@@ -399,7 +399,7 @@ namespace LaplaceSolver
   Solver<dim>::assemble_matrix (LinearSystem                                         &linear_system,
                                 const typename hp::DoFHandler<dim>::active_cell_iterator &begin_cell,
                                 const typename hp::DoFHandler<dim>::active_cell_iterator &end_cell,
-                                Threads::ThreadMutex                                 &mutex) const
+                                Threads::Mutex                                 &mutex) const
   {
     hp::FEValues<dim> fe_values (*fe, *quadrature,
                                  update_gradients | update_JxW_values);
@@ -428,7 +428,7 @@ namespace LaplaceSolver
 
         cell->get_dof_indices (local_dof_indices);
 
-        Threads::ThreadMutex::ScopedLock lock (mutex);
+        Threads::Mutex::ScopedLock lock (mutex);
         for (unsigned int i=0; i<dofs_per_cell; ++i)
           for (unsigned int j=0; j<dofs_per_cell; ++j)
             linear_system.matrix.add (local_dof_indices[i],

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.