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