diff options
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r-- | libgo/go/runtime/cgo_gccgo.go | 10 | ||||
-rw-r--r-- | libgo/go/runtime/lock_futex.go | 4 | ||||
-rw-r--r-- | libgo/go/runtime/lock_sema.go | 4 | ||||
-rw-r--r-- | libgo/go/runtime/malloc.go | 6 | ||||
-rw-r--r-- | libgo/go/runtime/norace_test.go | 4 | ||||
-rw-r--r-- | libgo/go/runtime/proc.go | 8 | ||||
-rw-r--r-- | libgo/go/runtime/stubs.go | 16 |
7 files changed, 25 insertions, 27 deletions
diff --git a/libgo/go/runtime/cgo_gccgo.go b/libgo/go/runtime/cgo_gccgo.go index 05be496..e689b0e 100644 --- a/libgo/go/runtime/cgo_gccgo.go +++ b/libgo/go/runtime/cgo_gccgo.go @@ -47,7 +47,7 @@ func Cgocall() { mp := getg().m mp.ncgocall++ mp.ncgo++ - entersyscall(0) + entersyscall() mp.incgo = true } @@ -63,7 +63,7 @@ func CgocallDone() { // If we are invoked because the C function called _cgo_panic, // then _cgo_panic will already have exited syscall mode. if readgstatus(gp)&^_Gscan == _Gsyscall { - exitsyscall(0) + exitsyscall() } } @@ -84,7 +84,7 @@ func CgocallBack() { lockOSThread() - exitsyscall(0) + exitsyscall() gp.m.incgo = false if gp.m.ncgo == 0 { @@ -134,7 +134,7 @@ func CgocallBackDone() { } gp.m.incgo = true - entersyscall(0) + entersyscall() if drop { mp.dropextram = false @@ -144,7 +144,7 @@ func CgocallBackDone() { // _cgo_panic may be called by SWIG code to panic. func _cgo_panic(p *byte) { - exitsyscall(0) + exitsyscall() panic(gostringnocopy(p)) } diff --git a/libgo/go/runtime/lock_futex.go b/libgo/go/runtime/lock_futex.go index 7ddd378..b2c9ccb 100644 --- a/libgo/go/runtime/lock_futex.go +++ b/libgo/go/runtime/lock_futex.go @@ -236,8 +236,8 @@ func notetsleepg(n *note, ns int64) bool { throw("notetsleepg on g0") } - entersyscallblock(0) + entersyscallblock() ok := notetsleep_internal(n, ns) - exitsyscall(0) + exitsyscall() return ok } diff --git a/libgo/go/runtime/lock_sema.go b/libgo/go/runtime/lock_sema.go index d000b11..b5cce6a 100644 --- a/libgo/go/runtime/lock_sema.go +++ b/libgo/go/runtime/lock_sema.go @@ -289,8 +289,8 @@ func notetsleepg(n *note, ns int64) bool { throw("notetsleepg on g0") } semacreate(gp.m) - entersyscallblock(0) + entersyscallblock() ok := notetsleep_internal(n, ns, nil, 0) - exitsyscall(0) + exitsyscall() return ok } diff --git a/libgo/go/runtime/malloc.go b/libgo/go/runtime/malloc.go index c8d5284..523989e 100644 --- a/libgo/go/runtime/malloc.go +++ b/libgo/go/runtime/malloc.go @@ -621,7 +621,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer { // callback. incallback := false if gomcache() == nil && getg().m.ncgo > 0 { - exitsyscall(0) + exitsyscall() incallback = true } @@ -709,7 +709,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer { mp.mallocing = 0 releasem(mp) if incallback { - entersyscall(0) + entersyscall() } return x } @@ -835,7 +835,7 @@ func mallocgc(size uintptr, typ *_type, needzero bool) unsafe.Pointer { } if incallback { - entersyscall(0) + entersyscall() } return x diff --git a/libgo/go/runtime/norace_test.go b/libgo/go/runtime/norace_test.go index e9b39b2..e90128b 100644 --- a/libgo/go/runtime/norace_test.go +++ b/libgo/go/runtime/norace_test.go @@ -34,12 +34,12 @@ func benchmarkSyscall(b *testing.B, work, excess int) { b.RunParallel(func(pb *testing.PB) { foo := 42 for pb.Next() { - runtime.Entersyscall(0) + runtime.Entersyscall() for i := 0; i < work; i++ { foo *= 2 foo /= 2 } - runtime.Exitsyscall(0) + runtime.Exitsyscall() } _ = foo }) diff --git a/libgo/go/runtime/proc.go b/libgo/go/runtime/proc.go index 5826958..4c217cc 100644 --- a/libgo/go/runtime/proc.go +++ b/libgo/go/runtime/proc.go @@ -1168,7 +1168,7 @@ func kickoff() { goexit1() } -func mstart1(dummy int32) { +func mstart1() { _g_ := getg() if _g_ != _g_.m.g0 { @@ -2774,7 +2774,7 @@ func entersyscallblock_handoff() { // //go:nosplit //go:nowritebarrierrec -func exitsyscall(dummy int32) { +func exitsyscall() { _g_ := getg() _g_.m.locks++ // see comment in entersyscall @@ -2984,13 +2984,13 @@ func exitsyscallclear(gp *g) { //go:linkname syscall_entersyscall syscall.Entersyscall //go:nosplit func syscall_entersyscall() { - entersyscall(0) + entersyscall() } //go:linkname syscall_exitsyscall syscall.Exitsyscall //go:nosplit func syscall_exitsyscall() { - exitsyscall(0) + exitsyscall() } func beforefork() { diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go index bda2c69..1d21445 100644 --- a/libgo/go/runtime/stubs.go +++ b/libgo/go/runtime/stubs.go @@ -199,16 +199,14 @@ func publicationBarrier() // getcallerpc returns the program counter (PC) of its caller's caller. // getcallersp returns the stack pointer (SP) of its caller's caller. // argp must be a pointer to the caller's first function argument. -// The implementation may or may not use argp, depending on -// the architecture. The implementation may be a compiler -// intrinsic; there is not necessarily code implementing this -// on every platform. +// The implementation may be a compiler intrinsic; there is not +// necessarily code implementing this on every platform. // // For example: // // func f(arg1, arg2, arg3 int) { // pc := getcallerpc() -// sp := getcallersp(unsafe.Pointer(&arg1)) +// sp := getcallersp() // } // // These two lines find the PC and SP immediately following @@ -230,7 +228,7 @@ func publicationBarrier() func getcallerpc() uintptr //go:noescape -func getcallersp(argp unsafe.Pointer) uintptr +func getcallersp() uintptr func asmcgocall(fn, arg unsafe.Pointer) int32 { throw("asmcgocall") @@ -309,9 +307,9 @@ func setSupportAES(v bool) { // Here for gccgo. func errno() int -// Temporary for gccgo until we port proc.go. -func entersyscall(int32) -func entersyscallblock(int32) +// For gccgo these are written in C. +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. |