1
0
mirror of https://github.com/golang/go synced 2024-11-17 09:44:48 -07:00

runtime: refine netpollunblock by removing unreachable 'if' condition

Change-Id: I58ac10013cadd78618124cb7ff134384d158ea4f
GitHub-Last-Rev: 2dfff0d3d3
GitHub-Pull-Request: golang/go#36276
Reviewed-on: https://go-review.googlesource.com/c/go/+/212557
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Andy Pan 2019-12-25 03:33:14 +00:00 committed by Ian Lance Taylor
parent 78a45d8b45
commit 33357270f1

View File

@ -447,7 +447,7 @@ func netpollunblock(pd *pollDesc, mode int32, ioready bool) *g {
new = pdReady
}
if atomic.Casuintptr(gpp, old, new) {
if old == pdReady || old == pdWait {
if old == pdWait {
old = 0
}
return (*g)(unsafe.Pointer(old))