Commit 7a43f8a5 authored by Tamir Duberstein's avatar Tamir Duberstein Committed by Austin Clements

runtime: resolve latent function type TODO

This was left over from the C->Go transition.

Change-Id: I52494af3d49a388dc45b57210ba68292ae01cf84
Reviewed-on: https://go-review.googlesource.com/c/go/+/176897
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarAustin Clements <austin@google.com>
parent 8d212c3a
...@@ -295,7 +295,7 @@ func gopark(unlockf func(*g, unsafe.Pointer) bool, lock unsafe.Pointer, reason w ...@@ -295,7 +295,7 @@ func gopark(unlockf func(*g, unsafe.Pointer) bool, lock unsafe.Pointer, reason w
throw("gopark: bad g status") throw("gopark: bad g status")
} }
mp.waitlock = lock mp.waitlock = lock
mp.waitunlockf = *(*unsafe.Pointer)(unsafe.Pointer(&unlockf)) mp.waitunlockf = unlockf
gp.waitreason = reason gp.waitreason = reason
mp.waittraceev = traceEv mp.waittraceev = traceEv
mp.waittraceskip = traceskip mp.waittraceskip = traceskip
...@@ -2595,8 +2595,7 @@ func park_m(gp *g) { ...@@ -2595,8 +2595,7 @@ func park_m(gp *g) {
casgstatus(gp, _Grunning, _Gwaiting) casgstatus(gp, _Grunning, _Gwaiting)
dropg() dropg()
if _g_.m.waitunlockf != nil { if fn := _g_.m.waitunlockf; fn != nil {
fn := *(*func(*g, unsafe.Pointer) bool)(unsafe.Pointer(&_g_.m.waitunlockf))
ok := fn(gp, _g_.m.waitlock) ok := fn(gp, _g_.m.waitlock)
_g_.m.waitunlockf = nil _g_.m.waitunlockf = nil
_g_.m.waitlock = nil _g_.m.waitlock = nil
......
...@@ -491,11 +491,11 @@ type m struct { ...@@ -491,11 +491,11 @@ type m struct {
schedlink muintptr schedlink muintptr
mcache *mcache mcache *mcache
lockedg guintptr lockedg guintptr
createstack [32]uintptr // stack that created this thread. createstack [32]uintptr // stack that created this thread.
lockedExt uint32 // tracking for external LockOSThread lockedExt uint32 // tracking for external LockOSThread
lockedInt uint32 // tracking for internal lockOSThread lockedInt uint32 // tracking for internal lockOSThread
nextwaitm muintptr // next m waiting for lock nextwaitm muintptr // next m waiting for lock
waitunlockf unsafe.Pointer // todo go func(*g, unsafe.pointer) bool waitunlockf func(*g, unsafe.Pointer) bool
waitlock unsafe.Pointer waitlock unsafe.Pointer
waittraceev byte waittraceev byte
waittraceskip int waittraceskip int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment