summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2016-08-03 18:08:57 +0000
committerPirama Arumuga Nainar <pirama@google.com>2016-08-03 18:08:57 +0000
commit0554d25eb3ff62d6c80097df6a5cecbbc92bfaeb (patch)
tree09fbc31a17fb4499b0cb8d1aa2bddb56ca4d4fd6
parent204f7dc56e445073bfd1ef781436d8d244a9c9ee (diff)
downloadbcm5719-llvm-0554d25eb3ff62d6c80097df6a5cecbbc92bfaeb.tar.gz
bcm5719-llvm-0554d25eb3ff62d6c80097df6a5cecbbc92bfaeb.zip
Disable KMP_CANCEL_THREADS on Android
Summary: Android does not have pthread_cancel. Disable KMP_CANCEL_THREADS if __ANDROID__ is defined. Subscribers: tberghammer, srhines, openmp-commits, danalbert Differential Revision: https://reviews.llvm.org/D23029 llvm-svn: 277618
-rw-r--r--openmp/runtime/src/kmp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 6fc378b0ec2..2ec01415061 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -55,6 +55,12 @@
#define KMP_CANCEL_THREADS
#define KMP_THREAD_ATTR
+// Android does not have pthread_cancel. Undefine KMP_CANCEL_THREADS if being
+// built on Android
+#if defined(__ANDROID__)
+#undef KMP_CANCEL_THREADS
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
OpenPOWER on IntegriCloud