mirror of
https://github.com/golang/go
synced 2024-11-19 14:54:43 -07:00
runtime: more cleanups
Move timenow thunk into time.s Move declarations for generic c/asm services into stubs.go LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/137360043
This commit is contained in:
parent
251daf8650
commit
1a5e394ab7
@ -2241,9 +2241,6 @@ TEXT runtime·duffcopy(SB), NOSPLIT, $0-0
|
||||
|
||||
RET
|
||||
|
||||
TEXT runtime·timenow(SB), NOSPLIT, $0-0
|
||||
JMP time·now(SB)
|
||||
|
||||
TEXT runtime·fastrand1(SB), NOSPLIT, $0-4
|
||||
get_tls(CX)
|
||||
MOVL g(CX), AX
|
||||
|
@ -2186,9 +2186,6 @@ TEXT runtime·duffcopy(SB), NOSPLIT, $0-0
|
||||
|
||||
RET
|
||||
|
||||
TEXT runtime·timenow(SB), NOSPLIT, $0-0
|
||||
JMP time·now(SB)
|
||||
|
||||
TEXT runtime·fastrand1(SB), NOSPLIT, $0-4
|
||||
get_tls(CX)
|
||||
MOVQ g(CX), AX
|
||||
|
@ -1069,9 +1069,6 @@ eqret:
|
||||
MOVB AX, ret+24(FP)
|
||||
RET
|
||||
|
||||
TEXT runtime·timenow(SB), NOSPLIT, $0-0
|
||||
JMP time·now(SB)
|
||||
|
||||
TEXT runtime·fastrand1(SB), NOSPLIT, $0-4
|
||||
get_tls(CX)
|
||||
MOVL g(CX), AX
|
||||
|
@ -848,9 +848,6 @@ _sib_notfound:
|
||||
MOVW R0, ret+12(FP)
|
||||
RET
|
||||
|
||||
TEXT runtime·timenow(SB),NOSPLIT,$0-0
|
||||
B time·now(SB)
|
||||
|
||||
// A Duff's device for zeroing memory.
|
||||
// The compiler jumps to computed addresses within
|
||||
// this routine to zero chunks of memory. Do not
|
||||
|
@ -126,8 +126,6 @@ func Callers(skip int, pc []uintptr) int {
|
||||
return callers(skip, &pc[0], len(pc))
|
||||
}
|
||||
|
||||
func getgoroot() string
|
||||
|
||||
// GOROOT returns the root of the Go tree.
|
||||
// It uses the GOROOT environment variable, if set,
|
||||
// or else the root used during the Go build.
|
||||
|
@ -28,8 +28,6 @@ func gc_notype_ptr(ret *interface{}) {
|
||||
*ret = x
|
||||
}
|
||||
|
||||
func timenow() (sec int64, nsec int32)
|
||||
|
||||
func gc_unixnanotime(now *int64) {
|
||||
sec, nsec := timenow()
|
||||
*now = sec*1e9 + int64(nsec)
|
||||
|
@ -295,9 +295,6 @@ func SetBlockProfileRate(rate int) {
|
||||
atomicstore64(&blockprofilerate, uint64(r))
|
||||
}
|
||||
|
||||
func fastrand1() uint32 // assembly
|
||||
func readgstatus(*g) uint32 // proc.c
|
||||
|
||||
func blockevent(cycles int64, skip int) {
|
||||
if cycles <= 0 {
|
||||
return
|
||||
|
@ -28,6 +28,7 @@ func getg() *g
|
||||
func acquirem() *m
|
||||
func releasem(mp *m)
|
||||
func gomcache() *mcache
|
||||
func readgstatus(*g) uint32 // proc.c
|
||||
|
||||
// mcall switches from the g to the g0 stack and invokes fn(g),
|
||||
// where g is the goroutine that made the call.
|
||||
@ -121,6 +122,9 @@ func unlockOSThread()
|
||||
// exported value for testing
|
||||
var hashLoad = loadFactor
|
||||
|
||||
// in asm_*.s
|
||||
func fastrand1() uint32
|
||||
|
||||
// in asm_*.s
|
||||
//go:noescape
|
||||
func memeq(a, b unsafe.Pointer, size uintptr) bool
|
||||
@ -229,3 +233,6 @@ func rt0_go()
|
||||
// to deferreturn.
|
||||
// in asm_*.s
|
||||
func return0()
|
||||
|
||||
// thunk to call time.now.
|
||||
func timenow() (sec int64, nsec int32)
|
||||
|
@ -157,3 +157,6 @@ TEXT runtime·main_init(SB),NOSPLIT,$0-0
|
||||
|
||||
TEXT runtime·main_main(SB),NOSPLIT,$0-0
|
||||
JMP main·main(SB)
|
||||
|
||||
TEXT runtime·timenow(SB), NOSPLIT, $0-0
|
||||
JMP time·now(SB)
|
||||
|
Loading…
Reference in New Issue
Block a user