spinwait-detection.patch 616 B

1234567891011121314151617
  1. --- a/include/jemalloc/internal/jemalloc_internal_defs-linux.h (index)
  2. +++ b/include/jemalloc/internal/jemalloc_internal_defs-linux.h (working tree)
  3. @@ -33,9 +33,14 @@
  4. * Hyper-threaded CPUs may need a special instruction inside spin loops in
  5. * order to yield to another virtual CPU.
  6. */
  7. +#if defined(__i386__) || defined(__amd64__)
  8. #define CPU_SPINWAIT __asm__ volatile("pause")
  9. /* 1 if CPU_SPINWAIT is defined, 0 otherwise. */
  10. #define HAVE_CPU_SPINWAIT 1
  11. +#else
  12. +#define CPU_SPINWAIT
  13. +#define HAVE_CPU_SPINWAIT 0
  14. +#endif
  15. /*
  16. * Number of significant bits in virtual addresses. This may be less than the