From: Daniel Arndt Date: Tue, 6 Nov 2018 16:23:31 +0000 (+0100) Subject: Only declare PosixThreadBarrier if there is POSIX support X-Git-Tag: v9.1.0-rc1~574^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7422%2Fhead;p=dealii.git Only declare PosixThreadBarrier if there is POSIX support --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index b0b0566922..b3993b51b7 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -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