You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.2 KiB

--- a/config.h.in
+++ b/config.h.in
@@ -45,6 +45,9 @@
/* Define to 1 if you have the `arc4random_uniform' function. */
#undef HAVE_ARC4RANDOM_UNIFORM
+/* Define if the ARM yield instruction is available */
+#undef HAVE_ARM_YIELD
+
/* Define to 1 if the compiler supports __builtin_clz. */
#undef HAVE_BUILTIN_CLZ
--- a/configure.ac
+++ b/configure.ac
@@ -421,8 +421,8 @@ AS_CASE([$host],
[[]],
[[__asm__ __volatile__ ("yield")]]
)],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_ERROR([no, try adding -march=native or -march=armv7-a to CFLAGS (see PLATFORMS.md for more information)])])])
+ [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_ARM_YIELD],[1],[Define if the ARM yield instruction is available])],
+ [AC_MSG_RESULT([no])])])
AC_CHECK_FUNCS([sysctlbyname])
--- a/lib/isc/rwlock.c
+++ b/lib/isc/rwlock.c
@@ -54,7 +54,7 @@
# define isc_rwlock_pause() __asm__ __volatile__ ("rep; nop")
#elif defined(__ia64__)
# define isc_rwlock_pause() __asm__ __volatile__ ("hint @pause")
-#elif defined(__arm__)
+#elif defined(__arm__) && HAVE_ARM_YIELD
# define isc_rwlock_pause() __asm__ __volatile__ ("yield")
#elif defined(sun) && (defined(__sparc) || defined(__sparc__))
# define isc_rwlock_pause() smt_pause()