diff options
author | bviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-20 17:49:22 +0000 |
---|---|---|
committer | bviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-20 17:49:22 +0000 |
commit | 9d5dde5d7b5d489564fed3a3017b243b0e1bfbf4 (patch) | |
tree | eb5a127638b9e145246c0b66ed3d8260ff8064dd /libcilkrts/runtime | |
parent | 33a9ec1309cf9e4c8b64f289acf509c81d5bb3f8 (diff) | |
download | gcc-9d5dde5d7b5d489564fed3a3017b243b0e1bfbf4.tar.gz |
Fix for PR other/58996.
+2014-01-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR other/58996
+ * configure.ac: Added a check for pthread affinity support.
+ * runtime/os-unix.c: Likewise.
+ * configure: Regenerate.
+
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206846 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcilkrts/runtime')
-rw-r--r-- | libcilkrts/runtime/os-unix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcilkrts/runtime/os-unix.c b/libcilkrts/runtime/os-unix.c index dbca21f6f3c..fafb91d91a1 100644 --- a/libcilkrts/runtime/os-unix.c +++ b/libcilkrts/runtime/os-unix.c @@ -311,6 +311,10 @@ static pid_t linux_gettid(void) */ static int linux_get_affinity_count (int tid) { +#if !defined HAVE_PTHREAD_AFFINITY_NP + return 0; +#else + cpu_set_t process_mask; // Extract the thread affinity mask @@ -337,6 +341,7 @@ static int linux_get_affinity_count (int tid) } return available_procs; +#endif } #endif |