diff options
author | Jordan <me@jordan.im> | 2022-09-30 11:52:44 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2022-09-30 11:52:44 -0700 |
commit | 0192a4e3f1c90df255e44831a579d9b0f611a543 (patch) | |
tree | 52c6bfa35b5491560af253a5e5ba90ed8a729871 /vendor/golang.org/x/sys/cpu/cpu_arm64.go | |
parent | 66bfe530b4fd5cb9755337ce718df26ee81f1b77 (diff) | |
download | keep-0192a4e3f1c90df255e44831a579d9b0f611a543.tar.gz keep-0192a4e3f1c90df255e44831a579d9b0f611a543.zip |
go.mod: bump discordgo, go-sqlite3, x/net
Diffstat (limited to 'vendor/golang.org/x/sys/cpu/cpu_arm64.go')
-rw-r--r-- | vendor/golang.org/x/sys/cpu/cpu_arm64.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go index 87dd5e3..f3eb993 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go @@ -6,7 +6,10 @@ package cpu import "runtime" -const cacheLineSize = 64 +// cacheLineSize is used to prevent false sharing of cache lines. +// We choose 128 because Apple Silicon, a.k.a. M1, has 128-byte cache line size. +// It doesn't cost much and is much more future-proof. +const cacheLineSize = 128 func initOptions() { options = []option{ @@ -41,13 +44,10 @@ func archInit() { switch runtime.GOOS { case "freebsd": readARM64Registers() - case "linux", "netbsd": + case "linux", "netbsd", "openbsd": doinit() default: - // Most platforms don't seem to allow reading these registers. - // - // OpenBSD: - // See https://golang.org/issue/31746 + // Many platforms don't seem to allow reading these registers. setMinimalFeatures() } } |