diff options
Diffstat (limited to 'libgo/go/sync/rwmutex.go')
-rw-r--r-- | libgo/go/sync/rwmutex.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/sync/rwmutex.go b/libgo/go/sync/rwmutex.go index 6734360e37a..71064eeeba3 100644 --- a/libgo/go/sync/rwmutex.go +++ b/libgo/go/sync/rwmutex.go @@ -61,7 +61,7 @@ func (rw *RWMutex) RUnlock() { if r := atomic.AddInt32(&rw.readerCount, -1); r < 0 { if r+1 == 0 || r+1 == -rwmutexMaxReaders { race.Enable() - panic("sync: RUnlock of unlocked RWMutex") + throw("sync: RUnlock of unlocked RWMutex") } // A writer is pending. if atomic.AddInt32(&rw.readerWait, -1) == 0 { @@ -115,7 +115,7 @@ func (rw *RWMutex) Unlock() { r := atomic.AddInt32(&rw.readerCount, rwmutexMaxReaders) if r >= rwmutexMaxReaders { race.Enable() - panic("sync: Unlock of unlocked RWMutex") + throw("sync: Unlock of unlocked RWMutex") } // Unblock blocked readers, if any. for i := 0; i < int(r); i++ { |