1
0
mirror of https://github.com/golang/go synced 2024-11-23 06:10:05 -07:00

runtime: change 0 to pollNoError in netpollblock

Change-Id: I95e91ff21420e396aef876e77bc4ccdc45ab40ca
GitHub-Last-Rev: 8e6bd3f002
GitHub-Pull-Request: golang/go#47372
Reviewed-on: https://go-review.googlesource.com/c/go/+/337249
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Xargin 2021-07-28 20:40:07 +00:00 committed by Austin Clements
parent 08e2519ded
commit 69107e73ce

View File

@ -441,7 +441,7 @@ func netpollblock(pd *pollDesc, mode int32, waitio bool) bool {
// need to recheck error states after setting gpp to pdWait
// this is necessary because runtime_pollUnblock/runtime_pollSetDeadline/deadlineimpl
// do the opposite: store to closing/rd/wd, membarrier, load of rg/wg
if waitio || netpollcheckerr(pd, mode) == 0 {
if waitio || netpollcheckerr(pd, mode) == pollNoError {
gopark(netpollblockcommit, unsafe.Pointer(gpp), waitReasonIOWait, traceEvGoBlockNet, 5)
}
// be careful to not lose concurrent pdReady notification