From e637c578360c15bd2b325314542610884ec84cf3 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 6 Nov 2018 17:23:31 +0100 Subject: [PATCH] Only declare PosixThreadBarrier if there is POSIX support --- include/deal.II/base/thread_management.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.39.5