diff options
| author | Mikio Hara <mikioh.mikioh@gmail.com> | 2017-04-10 12:26:49 +0900 |
|---|---|---|
| committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2017-04-11 01:29:20 +0000 |
| commit | 075ee299b19f6c7e9cc506f1c6420b4c71a61d12 (patch) | |
| tree | e7abcb3d2f6b8f235334f36df029ef09a5dca36c /src/internal/poll | |
| parent | 423e7e603765d0253d8970af1ae4bc1e8efd3fe5 (diff) | |
| download | go-git-075ee299b19f6c7e9cc506f1c6420b4c71a61d12.tar.gz | |
internal/poll: adjust panic messages
Change-Id: Ic9be3249e76da7e86cc41baa88935249a94e4a16
Reviewed-on: https://go-review.googlesource.com/40073
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/internal/poll')
| -rw-r--r-- | src/internal/poll/fd_mutex.go | 12 | ||||
| -rw-r--r-- | src/internal/poll/fd_windows.go | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/internal/poll/fd_mutex.go b/src/internal/poll/fd_mutex.go index 2b76053370..38d4be248d 100644 --- a/src/internal/poll/fd_mutex.go +++ b/src/internal/poll/fd_mutex.go @@ -56,7 +56,7 @@ func (mu *fdMutex) incref() bool { } new := old + mutexRef if new&mutexRefMask == 0 { - panic("net: inconsistent fdMutex") + panic("inconsistent poll.fdMutex") } if atomic.CompareAndSwapUint64(&mu.state, old, new) { return true @@ -75,7 +75,7 @@ func (mu *fdMutex) increfAndClose() bool { // Mark as closed and acquire a reference. new := (old | mutexClosed) + mutexRef if new&mutexRefMask == 0 { - panic("net: inconsistent fdMutex") + panic("inconsistent poll.fdMutex") } // Remove all read and write waiters. new &^= mutexRMask | mutexWMask @@ -101,7 +101,7 @@ func (mu *fdMutex) decref() bool { for { old := atomic.LoadUint64(&mu.state) if old&mutexRefMask == 0 { - panic("net: inconsistent fdMutex") + panic("inconsistent poll.fdMutex") } new := old - mutexRef if atomic.CompareAndSwapUint64(&mu.state, old, new) { @@ -136,13 +136,13 @@ func (mu *fdMutex) rwlock(read bool) bool { // Lock is free, acquire it. new = (old | mutexBit) + mutexRef if new&mutexRefMask == 0 { - panic("net: inconsistent fdMutex") + panic("inconsistent poll.fdMutex") } } else { // Wait for lock. new = old + mutexWait if new&mutexMask == 0 { - panic("net: inconsistent fdMutex") + panic("inconsistent poll.fdMutex") } } if atomic.CompareAndSwapUint64(&mu.state, old, new) { @@ -174,7 +174,7 @@ func (mu *fdMutex) rwunlock(read bool) bool { for { old := atomic.LoadUint64(&mu.state) if old&mutexBit == 0 || old&mutexRefMask == 0 { - panic("net: inconsistent fdMutex") + panic("inconsistent poll.fdMutex") } // Drop lock, drop reference and wake read waiter if present. new := (old &^ mutexBit) - mutexRef diff --git a/src/internal/poll/fd_windows.go b/src/internal/poll/fd_windows.go index 8f24bd65e5..a5a1c0c966 100644 --- a/src/internal/poll/fd_windows.go +++ b/src/internal/poll/fd_windows.go @@ -203,7 +203,7 @@ func (s *ioSrv) ExecIO(o *operation, name string, submit func(o *operation) erro case ErrClosing, ErrTimeout: // will deal with those. default: - panic("net: unexpected runtime.netpoll error: " + netpollErr.Error()) + panic("unexpected runtime.netpoll error: " + netpollErr.Error()) } // Cancel our request. if canCancelIO { |
