diff options
| author | Tamir Duberstein <tamird@google.com> | 2019-05-13 11:26:26 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2019-05-13 18:40:10 +0000 |
| commit | 7a43f8a5fb355a9cff73314d234da9a817695cbd (patch) | |
| tree | bcb894019926f0f77b463cf8d36b69783ca97ad5 /src/runtime/proc.go | |
| parent | 8d212c3ac3bacdf8d135e94d1e0a0c3cfba6e13a (diff) | |
| download | go-7a43f8a5fb355a9cff73314d234da9a817695cbd.tar.xz | |
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>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 3897731164..bf7835eb19 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -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 |
