var DebugOptions bool
// CacheLinePad is used to pad structs to avoid false sharing.
-type CacheLinePad struct{ _ [CacheLineSize]byte }
+type CacheLinePad struct{ _ [CacheLinePadSize]byte }
+
+// CacheLineSize is the CPU's assumed cache line size.
+// There is currently no runtime detection of the real cache line size
+// so we use the constant per GOARCH CacheLinePadSize as an approximation.
+var CacheLineSize = CacheLinePadSize
var X86 x86
package cpu
-const CacheLineSize = 32
+const CacheLinePadSize = 32
// arm doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
// These are linknamed in runtime/os_(linux|freebsd)_arm.go and are
package cpu
-const CacheLineSize = 64
+const CacheLinePadSize = 64
// arm64 doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
// These are initialized by archauxv in runtime/os_linux_arm64.go.
package cpu
-const CacheLineSize = 32
+const CacheLinePadSize = 32
package cpu
-const CacheLineSize = 32
+const CacheLinePadSize = 32
package cpu
-const CacheLineSize = 32
+const CacheLinePadSize = 32
package cpu
-const CacheLineSize = 32
+const CacheLinePadSize = 32
package cpu
-const CacheLineSize = 128
+const CacheLinePadSize = 128
// ppc64x doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
// These are initialized by archauxv in runtime/os_linux_ppc64x.go.
package cpu
-const CacheLineSize = 256
+const CacheLinePadSize = 256
// bitIsSet reports whether the bit at index is set. The bit index
// is in big endian order, so bit index 0 is the leftmost bit.
package cpu
-const CacheLineSize = 64
+const CacheLinePadSize = 64
package cpu
-const CacheLineSize = 64
+const CacheLinePadSize = 64
// cpuid is implemented in cpu_x86.s.
func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)