]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
MT_POSIX_NO_BARRIERS added
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Sep 2012 10:38:45 +0000 (10:38 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Sep 2012 10:38:45 +0000 (10:38 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26278 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/cmake/modules/configure_threads.cmake
deal.II/include/deal.II/base/config.h.in
deal.II/include/deal.II/base/config.h.in.old

index 1ae8d120d7cad60a82f86288bb1bda5d7081063f..8787435f611fbbf605ad6d85f50cbbdf71d0f853 100644 (file)
@@ -44,5 +44,23 @@ IF(CMAKE_USE_PTHREADS_INIT)
 
   # Check whether posix thread barriers are available:
 
+  CHECK_CXX_SOURCE_COMPILES(
+  "
+  #include <pthread.h>
+  int main()
+  {
+    pthread_barrier_t pb;
+    pthread_barrier_init (&pb, 0, 1);
+    pthread_barrier_wait (&pb);
+    pthread_barrier_destroy (&pb);
+    return 0;
+  }
+  "
+  DEAL_II_HAVE_MT_POSIX_BARRIERS)
+
+  IF(NOT DEAL_II_HAVE_MT_POSIX_BARRIERS)
+    SET(DEAL_II_USE_MT_POSIX_NO_BARRIERS TRUE)
+  ENDIF()
+
 ENDIF()
 
index 64c2d04ebcae6e360a93b8e3606e0ce4f4280c8b..8fb78dc57eb2a883fee21de918c9402e3cfc9d2e 100644 (file)
@@ -81,7 +81,7 @@
  * Barriers will then not work in the library, but the other threading
  * functionality is available.
  */
-#cmakedefine DEAL_II_USE_MT_POSIX_NO_BARRIERS
+#cmakedefine DEAL_II_USE_MT_POSIX_NO_BARRIERS 1
 
 /**
  * Depending on the use of threads, we will have to make some variables
index 1bf12fc3f23502874f794cbc173b5b1cc4a59daa..6f978e438db333228ada984de47a6fa6d541eace 100644 (file)
 /* Defined if a Metis installation was found and is going to be used */
 #cmakedefine DEAL_II_USE_METIS
 
-/* Defined if POSIX is supported but not the newer POSIX barrier functions.
-   Barriers will then not work in the library, but the other threading
-   functionality is available. */
-#cmakedefine DEAL_II_USE_MT_POSIX_NO_BARRIERS
-
 /* Defined if a MUMPS installation was found and is going to be used */
 #cmakedefine DEAL_II_USE_MUMPS
 

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.