mirror of
https://github.com/golang/go
synced 2024-11-23 20:00:04 -07:00
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: Austin Clements <austin@google.com>
This commit is contained in:
parent
8d212c3ac3
commit
7a43f8a5fb
@ -295,7 +295,7 @@ func gopark(unlockf func(*g, unsafe.Pointer) bool, lock unsafe.Pointer, reason w
|
||||
throw("gopark: bad g status")
|
||||
}
|
||||
mp.waitlock = lock
|
||||
mp.waitunlockf = *(*unsafe.Pointer)(unsafe.Pointer(&unlockf))
|
||||
mp.waitunlockf = unlockf
|
||||
gp.waitreason = reason
|
||||
mp.waittraceev = traceEv
|
||||
mp.waittraceskip = traceskip
|
||||
@ -2595,8 +2595,7 @@ func park_m(gp *g) {
|
||||
casgstatus(gp, _Grunning, _Gwaiting)
|
||||
dropg()
|
||||
|
||||
if _g_.m.waitunlockf != nil {
|
||||
fn := *(*func(*g, unsafe.Pointer) bool)(unsafe.Pointer(&_g_.m.waitunlockf))
|
||||
if fn := _g_.m.waitunlockf; fn != nil {
|
||||
ok := fn(gp, _g_.m.waitlock)
|
||||
_g_.m.waitunlockf = nil
|
||||
_g_.m.waitlock = nil
|
||||
|
@ -491,11 +491,11 @@ type m struct {
|
||||
schedlink muintptr
|
||||
mcache *mcache
|
||||
lockedg guintptr
|
||||
createstack [32]uintptr // stack that created this thread.
|
||||
lockedExt uint32 // tracking for external LockOSThread
|
||||
lockedInt uint32 // tracking for internal lockOSThread
|
||||
nextwaitm muintptr // next m waiting for lock
|
||||
waitunlockf unsafe.Pointer // todo go func(*g, unsafe.pointer) bool
|
||||
createstack [32]uintptr // stack that created this thread.
|
||||
lockedExt uint32 // tracking for external LockOSThread
|
||||
lockedInt uint32 // tracking for internal lockOSThread
|
||||
nextwaitm muintptr // next m waiting for lock
|
||||
waitunlockf func(*g, unsafe.Pointer) bool
|
||||
waitlock unsafe.Pointer
|
||||
waittraceev byte
|
||||
waittraceskip int
|
||||
|
Loading…
Reference in New Issue
Block a user