mirror of
https://github.com/golang/go.git
synced 2025-05-28 02:41:30 +00:00
internal/cpu: make architectures without initialization work explicit
When cpu_no_init.go was created most architectures did not have code in the doinit function. Currently only mips(le), riscv64 and wasm do not have empty doinit functions. Keeping cpu_no_init.go around does not reduce the work to satisfy the build process when adding support for new architectures. To support a new architecture a new file or build directive has to be added to an existing file at any rate to define the constant CacheLinePadSize. A new empty doinit can then be created in the new file or the existing doinit can be reused when adding the additional build directive. Change-Id: I58a97f8cdf1cf1be85c37f4550c40750358aa031 Reviewed-on: https://go-review.googlesource.com/c/go/+/263801 Trust: Martin Möhrmann <moehrmann@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
parent
de932da453
commit
feb984c96b
@ -5,3 +5,6 @@
|
||||
package cpu
|
||||
|
||||
const CacheLinePadSize = 32
|
||||
|
||||
func doinit() {
|
||||
}
|
||||
|
@ -5,3 +5,6 @@
|
||||
package cpu
|
||||
|
||||
const CacheLinePadSize = 32
|
||||
|
||||
func doinit() {
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !386
|
||||
// +build !amd64
|
||||
// +build !arm
|
||||
// +build !arm64
|
||||
// +build !ppc64
|
||||
// +build !ppc64le
|
||||
// +build !s390x
|
||||
// +build !mips64
|
||||
// +build !mips64le
|
||||
|
||||
package cpu
|
||||
|
||||
func doinit() {
|
||||
}
|
@ -5,3 +5,6 @@
|
||||
package cpu
|
||||
|
||||
const CacheLinePadSize = 32
|
||||
|
||||
func doinit() {
|
||||
}
|
||||
|
@ -5,3 +5,6 @@
|
||||
package cpu
|
||||
|
||||
const CacheLinePadSize = 64
|
||||
|
||||
func doinit() {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user