aboutsummaryrefslogtreecommitdiff
path: root/src/threadpool-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/threadpool-common.h')
-rw-r--r--src/threadpool-common.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/threadpool-common.h b/src/threadpool-common.h
index 1a18c60..ba5587e 100644
--- a/src/threadpool-common.h
+++ b/src/threadpool-common.h
@@ -14,6 +14,23 @@
#endif
#endif
+#ifndef PTHREADPOOL_USE_GCD
+ #if defined(__APPLE__)
+ #define PTHREADPOOL_USE_GCD 1
+ #else
+ #define PTHREADPOOL_USE_GCD 0
+ #endif
+#endif
+
+#ifndef PTHREADPOOL_USE_CONDVAR
+ #if PTHREADPOOL_USE_GCD || PTHREADPOOL_USE_FUTEX
+ #define PTHREADPOOL_USE_CONDVAR 0
+ #else
+ #define PTHREADPOOL_USE_CONDVAR 1
+ #endif
+#endif
+
+
/* Number of iterations in spin-wait loop before going into futex/condvar wait */
#define PTHREADPOOL_SPIN_WAIT_ITERATIONS 1000000