diff options
author | Clément Chigot <clement.chigot@atos.net> | 2019-04-12 11:32:48 +0200 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2019-04-12 16:53:04 +0000 |
commit | 480df2c2b4bc668e6b3a9d2f9ade1593da875be9 (patch) | |
tree | ca34854bb5681e2dc63d5d93f499e111a87049d8 /src/runtime/netpoll_aix.go | |
parent | 63cad96a9b38bfcde48a167e070cc8843c5aed13 (diff) | |
download | go-480df2c2b4bc668e6b3a9d2f9ade1593da875be9.tar.gz go-480df2c2b4bc668e6b3a9d2f9ade1593da875be9.zip |
runtime: remove debug prints in netpoll_aix.go
Change-Id: I80cca386de23cde39ab4ed3be9878374dc7607ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/171721
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/netpoll_aix.go')
-rw-r--r-- | src/runtime/netpoll_aix.go | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/runtime/netpoll_aix.go b/src/runtime/netpoll_aix.go index 0ad8718fe0..f0ba09460e 100644 --- a/src/runtime/netpoll_aix.go +++ b/src/runtime/netpoll_aix.go @@ -50,8 +50,6 @@ var ( pendingUpdates int32 ) -const pollVerbose = false - func netpollinit() { var p [2]int32 @@ -71,13 +69,7 @@ func netpollinit() { fcntl(wrwake, _F_SETFD, _FD_CLOEXEC) // Pre-allocate array of pollfd structures for poll. - if pollVerbose { - println("*** allocating") - } pfds = make([]pollfd, 1, 128) - if pollVerbose { - println("*** allocating done", &pfds[0]) - } // Poll the read side of the pipe. pfds[0].fd = rdwake @@ -99,18 +91,12 @@ func netpolldescriptor() uintptr { func netpollwakeup() { if pendingUpdates == 0 { pendingUpdates = 1 - if pollVerbose { - println("*** writing 1 byte") - } b := [1]byte{0} write(uintptr(wrwake), unsafe.Pointer(&b[0]), 1) } } func netpollopen(fd uintptr, pd *pollDesc) int32 { - if pollVerbose { - println("*** netpollopen", fd) - } lock(&mtxpoll) netpollwakeup() @@ -125,9 +111,6 @@ func netpollopen(fd uintptr, pd *pollDesc) int32 { } func netpollclose(fd uintptr) int32 { - if pollVerbose { - println("*** netpollclose", fd) - } lock(&mtxpoll) netpollwakeup() @@ -150,9 +133,6 @@ func netpollclose(fd uintptr) int32 { } func netpollarm(pd *pollDesc, mode int) { - if pollVerbose { - println("*** netpollarm", pd.fd, mode) - } lock(&mtxpoll) netpollwakeup() @@ -175,30 +155,18 @@ func netpoll(block bool) gList { timeout = 0 return gList{} } - if pollVerbose { - println("*** netpoll", block) - } retry: lock(&mtxpoll) lock(&mtxset) pendingUpdates = 0 unlock(&mtxpoll) - if pollVerbose { - println("*** netpoll before poll") - } n, e := poll(&pfds[0], uintptr(len(pfds)), timeout) - if pollVerbose { - println("*** netpoll after poll", n) - } if n < 0 { if e != _EINTR { println("errno=", e, " len(pfds)=", len(pfds)) throw("poll failed") } - if pollVerbose { - println("*** poll failed") - } unlock(&mtxset) goto retry } @@ -206,9 +174,6 @@ retry: if n != 0 && pfds[0].revents&(_POLLIN|_POLLHUP|_POLLERR) != 0 { var b [1]byte for read(rdwake, unsafe.Pointer(&b[0]), 1) == 1 { - if pollVerbose { - println("*** read 1 byte from pipe") - } } // 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 @@ -229,9 +194,6 @@ retry: pfd.events &= ^_POLLOUT } if mode != 0 { - if pollVerbose { - println("*** netpollready i=", i, "revents=", pfd.revents, "events=", pfd.events, "pd=", pds[i]) - } pds[i].everr = false if pfd.revents == _POLLERR { pds[i].everr = true @@ -244,8 +206,5 @@ retry: if block && toRun.empty() { goto retry } - if pollVerbose { - println("*** netpoll returning end") - } return toRun } |