diff options
Diffstat (limited to 'src/runtime/os_plan9.go')
-rw-r--r-- | src/runtime/os_plan9.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/runtime/os_plan9.go b/src/runtime/os_plan9.go index f0e7c6ae70..6f4578ff48 100644 --- a/src/runtime/os_plan9.go +++ b/src/runtime/os_plan9.go @@ -75,13 +75,13 @@ func os_sigpipe() { } func sigpanic() { - g := getg() - if !canpanic(g) { + gp := getg() + if !canpanic() { throw("unexpected signal during runtime execution") } - note := gostringnocopy((*byte)(unsafe.Pointer(g.m.notesig))) - switch g.sig { + note := gostringnocopy((*byte)(unsafe.Pointer(gp.m.notesig))) + switch gp.sig { case _SIGRFAULT, _SIGWFAULT: i := indexNoFloat(note, "addr=") if i >= 0 { @@ -92,17 +92,17 @@ func sigpanic() { panicmem() } addr := note[i:] - g.sigcode1 = uintptr(atolwhex(addr)) - if g.sigcode1 < 0x1000 { + gp.sigcode1 = uintptr(atolwhex(addr)) + if gp.sigcode1 < 0x1000 { panicmem() } - if g.paniconfault { - panicmemAddr(g.sigcode1) + if gp.paniconfault { + panicmemAddr(gp.sigcode1) } - print("unexpected fault address ", hex(g.sigcode1), "\n") + print("unexpected fault address ", hex(gp.sigcode1), "\n") throw("fault") case _SIGTRAP: - if g.paniconfault { + if gp.paniconfault { panicmem() } throw(note) @@ -473,19 +473,19 @@ func semacreate(mp *m) { //go:nosplit func semasleep(ns int64) int { - _g_ := getg() + gp := getg() if ns >= 0 { ms := timediv(ns, 1000000, nil) if ms == 0 { ms = 1 } - ret := plan9_tsemacquire(&_g_.m.waitsemacount, ms) + ret := plan9_tsemacquire(&gp.m.waitsemacount, ms) if ret == 1 { return 0 // success } return -1 // timeout or interrupted } - for plan9_semacquire(&_g_.m.waitsemacount, 1) < 0 { + for plan9_semacquire(&gp.m.waitsemacount, 1) < 0 { // interrupted; try again (c.f. lock_sema.go) } return 0 // success |