Fix compilation on CentOS 6 (i386)

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.
This commit is contained in:
Michał Kępień 2018-11-26 10:57:14 +01:00
parent 7e4ed9f8ad
commit 62ca7743ae

View file

@ -44,9 +44,11 @@
#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__)