Documentation ¶
Overview ¶
Package cpu implements processor feature detection used by the Go standard library.
Index ¶
Constants ¶
View Source
const CacheLineSize = 64
View Source
const GOARCH = "amd64"
Variables ¶
View Source
var ARM64 arm64
View Source
var DebugOptions bool
DebugOptions is set to true by the runtime if go was compiled with GOEXPERIMENT=debugcpu and GOOS is Linux or Darwin. This should not be changed after it is initialized.
View Source
var PPC64 ppc64
View Source
var S390X s390x
View Source
var X86 x86
Functions ¶
func Initialize ¶
func Initialize(env string)
Initialize examines the processor and sets the relevant variables above. This is called by the runtime package early in program initialization, before normal init functions are run. env is set by runtime on Linux and Darwin if go was compiled with GOEXPERIMENT=debugcpu.
Types ¶
type CacheLinePad ¶
type CacheLinePad struct {
// contains filtered or unexported fields
}
CacheLinePad is used to pad structs to avoid false sharing.
Click to show internal directories.
Click to hide internal directories.