]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix netpollBreak for AIX
authorClément Chigot <chigot.c@gmail.com>
Wed, 30 Oct 2019 12:56:12 +0000 (13:56 +0100)
committerIan Lance Taylor <iant@golang.org>
Wed, 30 Oct 2019 14:15:21 +0000 (14:15 +0000)
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>
src/runtime/netpoll_aix.go

index e1512f826cbc54e5620e7da0eed28ac83af95208..76ee8767713161386d0ad23aebd3835a98473528 100644 (file)
@@ -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