diff options
author | Michael Pratt <mpratt@google.com> | 2022-07-20 11:45:26 -0400 |
---|---|---|
committer | Michael Pratt <mpratt@google.com> | 2022-08-02 18:51:38 +0000 |
commit | 54a0ab3f7b240dcd6829d636cff3a40d19d5b266 (patch) | |
tree | 35fe58687b231b2374598b7105d6aa17d47396e5 | |
parent | 4240ff764b14de9007fe26aaa9147c6c0ade91c9 (diff) | |
download | go-54a0ab3f7b240dcd6829d636cff3a40d19d5b266.tar.gz go-54a0ab3f7b240dcd6829d636cff3a40d19d5b266.zip |
runtime: tricky replacements of _g_ in os3_plan9.go
Change-Id: I2a3ec71a33380b1215b9ab1ceb0a9b0e2bf7835b
Reviewed-on: https://go-review.googlesource.com/c/go/+/418582
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
-rw-r--r-- | src/runtime/os3_plan9.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/runtime/os3_plan9.go b/src/runtime/os3_plan9.go index e901b3e9dd..8c9cbe28ec 100644 --- a/src/runtime/os3_plan9.go +++ b/src/runtime/os3_plan9.go @@ -14,7 +14,9 @@ import ( // //go:nowritebarrierrec func sighandler(_ureg *ureg, note *byte, gp *g) int { - _g_ := getg() + gsignal := getg() + mp := gsignal.m + var t sigTabT var docrash bool var sig int @@ -61,7 +63,7 @@ func sighandler(_ureg *ureg, note *byte, gp *g) int { if flags&_SigPanic != 0 { // Copy the error string from sigtramp's stack into m->notesig so // we can reliably access it from the panic routines. - memmove(unsafe.Pointer(_g_.m.notesig), unsafe.Pointer(note), uintptr(len(notestr)+1)) + memmove(unsafe.Pointer(mp.notesig), unsafe.Pointer(note), uintptr(len(notestr)+1)) gp.sig = uint32(sig) gp.sigpc = c.pc() @@ -120,8 +122,8 @@ func sighandler(_ureg *ureg, note *byte, gp *g) int { return _NCONT } Throw: - _g_.m.throwing = throwTypeRuntime - _g_.m.caughtsig.set(gp) + mp.throwing = throwTypeRuntime + mp.caughtsig.set(gp) startpanic_m() print(notestr, "\n") print("PC=", hex(c.pc()), "\n") |