summaryrefslogtreecommitdiff
path: root/libcilkrts/runtime/os-unix.c
diff options
context:
space:
mode:
authorbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-11 19:56:42 +0000
committerbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-11 19:56:42 +0000
commit15bee5d49b1c746fd3e784432d7e4988941a671e (patch)
tree645d772791aebf2bf1350cf0a61a68575075b730 /libcilkrts/runtime/os-unix.c
parent3b4923ce8505182ce3054235f3f8b2bc3172b1c5 (diff)
downloadgcc-15bee5d49b1c746fd3e784432d7e4988941a671e.tar.gz
Fix for PR other/60644.
+2014-04-11 Barry Tannenbaum <barry.m.tannenbaum@intel.com> + + PR other/60644 + * runtime/os-unix.c: Replaced all occurrances of ANDROID with + __ANDROID__. + * runtime/bug.h: Likewise. + * include/cilk/metaprogramming.h: Likewise. + * include/cilk/reducer_min_max.h: Likewise. + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcilkrts/runtime/os-unix.c')
-rw-r--r--libcilkrts/runtime/os-unix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcilkrts/runtime/os-unix.c b/libcilkrts/runtime/os-unix.c
index fafb91d91a1..c9ddbbc5961 100644
--- a/libcilkrts/runtime/os-unix.c
+++ b/libcilkrts/runtime/os-unix.c
@@ -282,7 +282,7 @@ void __cilkrts_init_tls_variables(void)
}
#endif
-#if defined (__linux__) && ! defined(ANDROID)
+#if defined (__linux__) && ! defined(__ANDROID__)
/*
* Get the thread id, rather than the pid. In the case of MIC offload, it's
* possible that we have multiple threads entering Cilk, and each has a
@@ -343,7 +343,7 @@ static int linux_get_affinity_count (int tid)
return available_procs;
#endif
}
-#endif
+#endif // defined (__linux__) && ! defined(__ANDROID__)
/*
* __cilkrts_hardware_cpu_count
@@ -354,7 +354,7 @@ static int linux_get_affinity_count (int tid)
COMMON_SYSDEP int __cilkrts_hardware_cpu_count(void)
{
-#if defined ANDROID || (defined(__sun__) && defined(__svr4__))
+#if defined __ANDROID__ || (defined(__sun__) && defined(__svr4__))
return sysconf (_SC_NPROCESSORS_ONLN);
#elif defined __MIC__
/// HACK: Usually, the 3rd and 4th hyperthreads are not beneficial
@@ -409,7 +409,7 @@ COMMON_SYSDEP void __cilkrts_yield(void)
// giving up the processor and latency starting up when work becomes
// available
_mm_delay_32(1024);
-#elif defined(ANDROID) || (defined(__sun__) && defined(__svr4__))
+#elif defined(__ANDROID__) || (defined(__sun__) && defined(__svr4__))
// On Android and Solaris, call sched_yield to yield quantum. I'm not
// sure why we don't do this on Linux also.
sched_yield();