]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix compilation on CentOS 6 (i386)
authorMichał Kępień <michal@isc.org>
Mon, 26 Nov 2018 09:57:14 +0000 (10:57 +0100)
committerMichał Kępień <michal@isc.org>
Mon, 26 Nov 2018 09:57:14 +0000 (10:57 +0100)
The stock toolchain available on CentOS 6 for i386 is unable to use the
_mm_pause() intrinsic.  Fix by using "rep; nop" assembly instructions on
that platform instead.

lib/isc/rwlock.c

index 98a835e86102aaed4e2eb697ace7aff370f054c5..a914ba4ceea4fc13da2cecda4524823c634939c2 100644 (file)
 #if defined(_MSC_VER)
 # include <intrin.h>
 # define isc_rwlock_pause() YieldProcessor()
-#elif defined(__x86_64__) || defined(__i386__)
+#elif defined(__x86_64__)
 # include <immintrin.h>
 # define isc_rwlock_pause() _mm_pause()
+#elif defined(__i386__)
+# define isc_rwlock_pause() __asm__ __volatile__ ("rep; nop")
 #elif defined(__ia64__)
 # define isc_rwlock_pause() __asm__ __volatile__ ("hint @pause")
 #elif defined(__arm__)