]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Only declare PosixThreadBarrier if there is POSIX support 7422/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 6 Nov 2018 16:23:31 +0000 (17:23 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 6 Nov 2018 16:28:46 +0000 (17:28 +0100)
include/deal.II/base/thread_management.h

index b0b056692256a6ea4ea15a36cd3fd56ca81672e7..b3993b51b7903f29994beb7bff8cf4cbc5b0dde6 100644 (file)
@@ -215,7 +215,7 @@ namespace Threads
     std::condition_variable condition_variable;
   };
 
-
+#  ifdef DEAL_II_USE_MT_POSIX
   /**
    * Implementation of a thread barrier class, based on the POSIX thread
    * functions. POSIX barriers are a relatively new feature and are not
@@ -263,11 +263,11 @@ namespace Threads
      * Data object storing the POSIX data which we need to call the POSIX
      * functions.
      */
-#  ifndef DEAL_II_USE_MT_POSIX_NO_BARRIERS
+#    ifndef DEAL_II_USE_MT_POSIX_NO_BARRIERS
     pthread_barrier_t barrier;
-#  else
+#    else
     unsigned int count;
-#  endif
+#    endif
   };
 
 
@@ -279,6 +279,7 @@ namespace Threads
    *   is deprecated.
    */
   using Barrier DEAL_II_DEPRECATED = PosixThreadBarrier;
+#  endif
 } // namespace Threads
 
 

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.