From 33372cbd4075e70b1e365a6dd6708edd0d68c3a4 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 27 Apr 2020 20:28:17 +0100 Subject: [PATCH] cpu instruction spin wait for arm32/64 --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index f67fc3d71f..98cb4bc8cb 100644 --- a/configure.ac +++ b/configure.ac @@ -416,6 +416,16 @@ case "${host_cpu}" in fi fi ;; + aarch64|arm*) + HAVE_CPU_SPINWAIT=1 + AC_CACHE_VAL([je_cv_yield], + [JE_COMPILABLE([yield instruction], [], + [[__asm__ volatile("yield"); return 0;]], + [je_cv_yield])]) + if test "x${je_cv_yield}" = "xyes" ; then + CPU_SPINWAIT='__asm__ volatile("yield")' + fi + ;; *) HAVE_CPU_SPINWAIT=0 ;;