1
0
mirror of https://github.com/golang/go synced 2024-11-23 12:00:14 -07:00

runtime: refine netpollunblock by removing unreachable 'if' condition

This commit is contained in:
Andy Pan 2019-12-25 10:53:38 +08:00
parent 4d5bb9c609
commit 2dfff0d3d3

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))