1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
8 "runtime/internal/atomic"
9 _ "unsafe" // for go:linkname
12 //go:generate go run wincallback.go
13 //go:generate go run mkduff.go
14 //go:generate go run mkfastlog2table.go
18 pad uint32 // ensure 8-byte alignment of val on 386
22 // Note: Called by runtime/pprof in addition to runtime code.
23 func tickspersecond() int64 {
24 r := int64(atomic.Load64(&ticks.val))
39 r = (c1 - c0) * 1000 * 1000 * 1000 / (t1 - t0)
43 atomic.Store64(&ticks.val, uint64(r))
52 //go:linkname syscall_runtime_envs syscall.runtime_envs
53 func syscall_runtime_envs() []string { return append([]string{}, envs...) }
55 //go:linkname syscall_Getpagesize syscall.Getpagesize
56 func syscall_Getpagesize() int { return int(physPageSize) }
58 //go:linkname os_runtime_args os.runtime_args
59 func os_runtime_args() []string { return append([]string{}, argslice...) }
61 //go:linkname syscall_Exit syscall.Exit
63 func syscall_Exit(code int) {