aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-12-22 13:27:53 -0500
committerRuss Cox <rsc@golang.org>2014-12-23 03:17:22 +0000
commit7a524a103647d0b839ff133be1b1b866c92d11fb (patch)
treec5b1f7f352509a9965911eb8fad11900e9c7ebc7 /src/runtime/runtime.go
parent200e7bf6b13a16452e5add94bb641ed434526e37 (diff)
downloadgo-7a524a103647d0b839ff133be1b1b866c92d11fb.tar.xz
runtime: remove thunk.s
Replace with uses of //go:linkname in Go files, direct use of name in .s files. The only one that really truly needs a jump is reflect.call; the jump is now next to the runtime.reflectcall assembly implementations. Change-Id: Ie7ff3020a8f60a8e4c8645fe236e7883a3f23f46 Reviewed-on: https://go-review.googlesource.com/1962 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/runtime.go')
-rw-r--r--src/runtime/runtime.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go
index 2e291c28be..2ce4618f3f 100644
--- a/src/runtime/runtime.go
+++ b/src/runtime/runtime.go
@@ -4,6 +4,8 @@
package runtime
+import _ "unsafe" // for go:linkname
+
//go:generate go run wincallback.go
var ticks struct {
@@ -55,8 +57,8 @@ func parforalloc(nthrmax uint32) *parfor {
var envs []string
var argslice []string
-// called from syscall
-func runtime_envs() []string { return envs }
+//go:linkname syscall_runtime_envs syscall.runtime_envs
+func syscall_runtime_envs() []string { return envs }
-// called from os
-func runtime_args() []string { return argslice }
+//go:linkname os_runtime_args os.runtime_args
+func os_runtime_args() []string { return argslice }