diff options
| author | Mikio Hara <mikioh.mikioh@gmail.com> | 2017-04-24 18:37:48 +0900 |
|---|---|---|
| committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2017-04-25 21:39:18 +0000 |
| commit | 91c9b0d568e41449f26858d88eb2fd085eaf306d (patch) | |
| tree | 9c1db20e66b464395fcd99c7c7d92e44a60ebe6b /src/runtime/netpoll.go | |
| parent | 5d306dcdace2ec5cde7d0008d6126c3cffe25ea1 (diff) | |
| download | go-91c9b0d568e41449f26858d88eb2fd085eaf306d.tar.xz | |
runtime: adjust netpoll panic messages
Change-Id: I34547b057605bb9e1e2227c41867589348560244
Reviewed-on: https://go-review.googlesource.com/41513
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/netpoll.go')
| -rw-r--r-- | src/runtime/netpoll.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/runtime/netpoll.go b/src/runtime/netpoll.go index 56fb286c3c..8dd4fb6319 100644 --- a/src/runtime/netpoll.go +++ b/src/runtime/netpoll.go @@ -105,10 +105,10 @@ func poll_runtime_pollOpen(fd uintptr) (*pollDesc, int) { pd := pollcache.alloc() lock(&pd.lock) if pd.wg != 0 && pd.wg != pdReady { - throw("netpollOpen: blocked write on free descriptor") + throw("runtime: blocked write on free polldesc") } if pd.rg != 0 && pd.rg != pdReady { - throw("netpollOpen: blocked read on free descriptor") + throw("runtime: blocked read on free polldesc") } pd.fd = fd pd.closing = false @@ -127,13 +127,13 @@ func poll_runtime_pollOpen(fd uintptr) (*pollDesc, int) { //go:linkname poll_runtime_pollClose internal/poll.runtime_pollClose func poll_runtime_pollClose(pd *pollDesc) { if !pd.closing { - throw("netpollClose: close w/o unblock") + throw("runtime: close polldesc w/o unblock") } if pd.wg != 0 && pd.wg != pdReady { - throw("netpollClose: blocked write on closing descriptor") + throw("runtime: blocked write on closing polldesc") } if pd.rg != 0 && pd.rg != pdReady { - throw("netpollClose: blocked read on closing descriptor") + throw("runtime: blocked read on closing polldesc") } netpollclose(pd.fd) pollcache.free(pd) @@ -264,7 +264,7 @@ func poll_runtime_pollSetDeadline(pd *pollDesc, d int64, mode int) { func poll_runtime_pollUnblock(pd *pollDesc) { lock(&pd.lock) if pd.closing { - throw("netpollUnblock: already closing") + throw("runtime: unblock on closing polldesc") } pd.closing = true pd.seq++ @@ -352,7 +352,7 @@ func netpollblock(pd *pollDesc, mode int32, waitio bool) bool { return true } if old != 0 { - throw("netpollblock: double wait") + throw("runtime: double wait") } if atomic.Casuintptr(gpp, 0, pdWait) { break @@ -368,7 +368,7 @@ func netpollblock(pd *pollDesc, mode int32, waitio bool) bool { // be careful to not lose concurrent READY notification old := atomic.Xchguintptr(gpp, 0) if old > pdWait { - throw("netpollblock: corrupted state") + throw("runtime: corrupted polldesc") } return old == pdReady } @@ -414,7 +414,7 @@ func netpolldeadlineimpl(pd *pollDesc, seq uintptr, read, write bool) { var rg *g if read { if pd.rd <= 0 || pd.rt.f == nil { - throw("netpolldeadlineimpl: inconsistent read deadline") + throw("runtime: inconsistent read deadline") } pd.rd = -1 atomicstorep(unsafe.Pointer(&pd.rt.f), nil) // full memory barrier between store to rd and load of rg in netpollunblock @@ -423,7 +423,7 @@ func netpolldeadlineimpl(pd *pollDesc, seq uintptr, read, write bool) { var wg *g if write { if pd.wd <= 0 || pd.wt.f == nil && !read { - throw("netpolldeadlineimpl: inconsistent write deadline") + throw("runtime: inconsistent write deadline") } pd.wd = -1 atomicstorep(unsafe.Pointer(&pd.wt.f), nil) // full memory barrier between store to wd and load of wg in netpollunblock |
