diff options
author | Clément Chigot <chigot.c@gmail.com> | 2019-10-30 13:56:12 +0100 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2019-10-30 14:15:21 +0000 |
commit | 301bc66a478198f0edfb5526d84f1d0c8a3d5c05 (patch) | |
tree | 0aa35a3ce7f89c70e19bc5586d55f33970168444 /src/runtime/netpoll_aix.go | |
parent | 17190de08570d36dda9b2904609271354cc3c64a (diff) | |
download | go-301bc66a478198f0edfb5526d84f1d0c8a3d5c05.tar.gz go-301bc66a478198f0edfb5526d84f1d0c8a3d5c05.zip |
runtime: fix netpollBreak for AIX
Change-Id: I2629711ce02d935130fb2aab29f9028b62ba9fe6
Reviewed-on: https://go-review.googlesource.com/c/go/+/204318
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/netpoll_aix.go')
-rw-r--r-- | src/runtime/netpoll_aix.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/runtime/netpoll_aix.go b/src/runtime/netpoll_aix.go index e1512f826c..76ee876771 100644 --- a/src/runtime/netpoll_aix.go +++ b/src/runtime/netpoll_aix.go @@ -185,13 +185,12 @@ retry: for read(rdwake, unsafe.Pointer(&b[0]), 1) == 1 { } } - // Do not look at the other fds in this case as the mode may have changed - // XXX only additions of flags are made, so maybe it is ok - unlock(&mtxset) - goto retry + // Still look at the other fds even if the mode may have + // changed, as netpollBreak might have been called. + n-- } var toRun gList - for i := 0; i < len(pfds) && n > 0; i++ { + for i := 1; i < len(pfds) && n > 0; i++ { pfd := &pfds[i] var mode int32 |