aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sema.go
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2018-06-05 08:14:57 +0200
committerMartin Möhrmann <moehrmann@google.com>2018-08-24 18:28:25 +0000
commit961eb13b6781907b5bfe4a7b22f68206020c4468 (patch)
treee2aff59d7b3dfff827710f2857755dec7b8a5bf8 /src/runtime/sema.go
parent2200b18258874ba61771ea78d5fbee99ba6fe71f (diff)
downloadgo-961eb13b6781907b5bfe4a7b22f68206020c4468.tar.gz
go-961eb13b6781907b5bfe4a7b22f68206020c4468.zip
runtime: replace sys.CacheLineSize by corresponding internal/cpu const and vars
sys here is runtime/internal/sys. Replace uses of sys.CacheLineSize for padding by cpu.CacheLinePad or cpu.CacheLinePadSize. Replace other uses of sys.CacheLineSize by cpu.CacheLineSize. Remove now unused sys.CacheLineSize. Updates #25203 Change-Id: I1daf410fe8f6c0493471c2ceccb9ca0a5a75ed8f Reviewed-on: https://go-review.googlesource.com/126601 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sema.go')
-rw-r--r--src/runtime/sema.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/sema.go b/src/runtime/sema.go
index aba9733127..18e0a398ba 100644
--- a/src/runtime/sema.go
+++ b/src/runtime/sema.go
@@ -20,8 +20,8 @@
package runtime
import (
+ "internal/cpu"
"runtime/internal/atomic"
- "runtime/internal/sys"
"unsafe"
)
@@ -48,7 +48,7 @@ const semTabSize = 251
var semtable [semTabSize]struct {
root semaRoot
- pad [sys.CacheLineSize - unsafe.Sizeof(semaRoot{})]byte
+ pad [cpu.CacheLinePadSize - unsafe.Sizeof(semaRoot{})]byte
}
//go:linkname sync_runtime_Semacquire sync.runtime_Semacquire