diff options
| author | Paul Osmialowski <pawel.osmialowski@arm.com> | 2016-05-16 09:44:11 +0000 |
|---|---|---|
| committer | Paul Osmialowski <pawel.osmialowski@arm.com> | 2016-05-16 09:44:11 +0000 |
| commit | fb043fdfffee2a292f70f1031b4fe093503eb11f (patch) | |
| tree | a6e7a8ae0a2f97154e3e9cc44560bc967a33e54e /openmp/runtime/src/z_Linux_util.c | |
| parent | a2bde88e62ac5ccffc1802f5b963189c0e4fab3c (diff) | |
| download | bcm5719-llvm-fb043fdfffee2a292f70f1031b4fe093503eb11f.tar.gz bcm5719-llvm-fb043fdfffee2a292f70f1031b4fe093503eb11f.zip | |
Clean all the mess around KMP_USE_FUTEX and kmp_lock.h
KMP_USE_FUTEX preprocessor definition defined in kmp_lock.h is used
inconsequently throughout LLVM libomp code.
* some .c files that use this define do not include kmp_lock.h file,
in effect guarded part of code are never compiled
* some places in code use architecture-depending preprocessor
logic expressions which effectively disable use of Futex for
AArch64 architecture, all these places should use
'#if KMP_USE_FUTEX' instead to avoid any further confusions
* some places use KMP_HAS_FUTEX which is nowhere defined,
KMP_USE_FUTEX should be used instead
Differential Revision: http://reviews.llvm.org/D19629
llvm-svn: 269642
Diffstat (limited to 'openmp/runtime/src/z_Linux_util.c')
| -rw-r--r-- | openmp/runtime/src/z_Linux_util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c index 6258263459d..891109a17af 100644 --- a/openmp/runtime/src/z_Linux_util.c +++ b/openmp/runtime/src/z_Linux_util.c @@ -18,6 +18,7 @@ #include "kmp_itt.h" #include "kmp_str.h" #include "kmp_i18n.h" +#include "kmp_lock.h" #include "kmp_io.h" #include "kmp_stats.h" #include "kmp_wait_release.h" @@ -34,7 +35,7 @@ #if KMP_OS_LINUX && !KMP_OS_CNK # include <sys/sysinfo.h> -# if KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) +# if KMP_USE_FUTEX // We should really include <futex.h>, but that causes compatibility problems on different // Linux* OS distributions that either require that you include (or break when you try to include) // <pci/types.h>. @@ -422,7 +423,7 @@ __kmp_affinity_determine_capable(const char *env_var) /* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */ -#if KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && !KMP_OS_CNK +#if KMP_USE_FUTEX && !KMP_OS_CNK int __kmp_futex_determine_capable() @@ -439,7 +440,7 @@ __kmp_futex_determine_capable() return retval; } -#endif // KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM) && !KMP_OS_CNK +#endif // KMP_USE_FUTEX && !KMP_OS_CNK /* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */ |

