summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/astra/AsyncAlgorithm.h4
-rw-r--r--include/astra/Globals.h7
-rw-r--r--matlab/mex/astra_mex_algorithm_c.cpp2
3 files changed, 9 insertions, 4 deletions
diff --git a/include/astra/AsyncAlgorithm.h b/include/astra/AsyncAlgorithm.h
index 36e2184..a3157fc 100644
--- a/include/astra/AsyncAlgorithm.h
+++ b/include/astra/AsyncAlgorithm.h
@@ -32,14 +32,12 @@ $Id$
#include "Config.h"
#include "Algorithm.h"
-#ifdef __linux__
-#define USE_PTHREADS
+#ifdef USE_PTHREADS
#include <pthread.h>
#else
#include <boost/thread.hpp>
#endif
-
namespace astra {
/**
diff --git a/include/astra/Globals.h b/include/astra/Globals.h
index fdeaa23..9c8ddfb 100644
--- a/include/astra/Globals.h
+++ b/include/astra/Globals.h
@@ -306,4 +306,11 @@ _AstraExport inline bool cudaEnabled() { return false; }
#endif
+//----------------------------------------------------------------------------------------
+// use pthreads on Linux and OSX
+#if defined(__linux__) || defined(__MACH__)
+#define USE_PTHREADS
+#endif
+
+
#endif
diff --git a/matlab/mex/astra_mex_algorithm_c.cpp b/matlab/mex/astra_mex_algorithm_c.cpp
index f719a6b..68342a7 100644
--- a/matlab/mex/astra_mex_algorithm_c.cpp
+++ b/matlab/mex/astra_mex_algorithm_c.cpp
@@ -38,7 +38,7 @@ $Id$
#ifdef USE_MATLAB_UNDOCUMENTED
extern "C" { bool utIsInterruptPending(); }
-#ifdef __linux__
+#ifdef USE_PTHREADS
#define USE_PTHREADS_CTRLC
#include <pthread.h>
#else