diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-06-03 23:02:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-06-03 23:02:43 +0000 |
commit | a920eb0cb08da30f4d7d4345f42067fdf8ce7b9b (patch) | |
tree | 2c48ef25fbdf64d208fc06549ae1c878dda60f07 /libgo/go | |
parent | fbd4b7f39ee26f1258aff5b86ad0fba06f3edd5e (diff) | |
download | gcc-a920eb0cb08da30f4d7d4345f42067fdf8ce7b9b.zip gcc-a920eb0cb08da30f4d7d4345f42067fdf8ce7b9b.tar.gz gcc-a920eb0cb08da30f4d7d4345f42067fdf8ce7b9b.tar.bz2 |
runtime: remove unnecessary functions calling between C and Go
These functions were needed during the transition of the runtime from
C to Go, but are no longer necessary.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179879
From-SVN: r271890
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/runtime/stubs.go | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go index 435cdf7..530997b 100644 --- a/libgo/go/runtime/stubs.go +++ b/libgo/go/runtime/stubs.go @@ -310,13 +310,6 @@ func errno() int func entersyscall() func entersyscallblock() -// For gccgo to call from C code, so that the C code and the Go code -// can share the memstats variable for now. -//go:linkname getMstats runtime.getMstats -func getMstats() *mstats { - return &memstats -} - // Get signal trampoline, written in C. func getSigtramp() uintptr @@ -338,48 +331,12 @@ func dumpregs(*_siginfo_t, unsafe.Pointer) // Implemented in C for gccgo. func setRandomNumber(uint32) -// Temporary for gccgo until we port proc.go. -//go:linkname getsched runtime.getsched -func getsched() *schedt { - return &sched -} - -// Temporary for gccgo until we port proc.go. -//go:linkname getCgoHasExtraM runtime.getCgoHasExtraM -func getCgoHasExtraM() *bool { - return &cgoHasExtraM -} - -// Temporary for gccgo until we port proc.go. -//go:linkname getAllP runtime.getAllP -func getAllP() **p { - return &allp[0] -} - -// Temporary for gccgo until we port proc.go. +// Called by gccgo's proc.c. //go:linkname allocg runtime.allocg func allocg() *g { return new(g) } -// Temporary for gccgo until we port the garbage collector. -//go:linkname getallglen runtime.getallglen -func getallglen() uintptr { - return allglen -} - -// Temporary for gccgo until we port the garbage collector. -//go:linkname getallg runtime.getallg -func getallg(i int) *g { - return allgs[i] -} - -// Temporary for gccgo until we port the garbage collector. -//go:linkname getallm runtime.getallm -func getallm() *m { - return allm -} - // Throw and rethrow an exception. func throwException() func rethrowException() @@ -388,13 +345,6 @@ func rethrowException() // used by the stack unwinder. func unwindExceptionSize() uintptr -// Temporary for gccgo until C code no longer needs it. -//go:nosplit -//go:linkname getPanicking runtime.getPanicking -func getPanicking() uint32 { - return panicking -} - // Called by C code to set the number of CPUs. //go:linkname setncpu runtime.setncpu func setncpu(n int32) { @@ -409,18 +359,6 @@ func setpagesize(s uintptr) { } } -// Called by C code during library initialization. -//go:linkname runtime_m0 runtime.runtime_m0 -func runtime_m0() *m { - return &m0 -} - -// Temporary for gccgo until we port mgc.go. -//go:linkname runtime_g0 runtime.runtime_g0 -func runtime_g0() *g { - return &g0 -} - const uintptrMask = 1<<(8*sys.PtrSize) - 1 type bitvector struct { |