From 6a59e7f510a7b12f8b3bd768dfe569033ef07d30 Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Tue, 21 Jan 2020 19:23:26 -0800 Subject: Rename DowngradableRWMutex to RWmutex. Also renames TMutex to Mutex. These custom mutexes aren't any worse than the standard library versions (same code), so having both seems redundant. PiperOrigin-RevId: 290873587 --- pkg/sync/tmutex_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkg/sync/tmutex_test.go') diff --git a/pkg/sync/tmutex_test.go b/pkg/sync/tmutex_test.go index c640bae23..0838248b4 100644 --- a/pkg/sync/tmutex_test.go +++ b/pkg/sync/tmutex_test.go @@ -30,7 +30,7 @@ func TestStructSize(t *testing.T) { // // The correctness of this package relies on these remaining in sync. func TestFieldValues(t *testing.T) { - var m TMutex + var m Mutex m.Lock() if got := *m.state(); got != mutexLocked { t.Errorf("got locked sync.Mutex.state = %d, want = %d", got, mutexLocked) @@ -42,7 +42,7 @@ func TestFieldValues(t *testing.T) { } func TestDoubleTryLock(t *testing.T) { - var m TMutex + var m Mutex if !m.TryLock() { t.Fatal("failed to aquire lock") } @@ -52,7 +52,7 @@ func TestDoubleTryLock(t *testing.T) { } func TestTryLockAfterLock(t *testing.T) { - var m TMutex + var m Mutex m.Lock() if m.TryLock() { t.Fatal("unexpectedly succeeded in aquiring locked mutex") @@ -60,7 +60,7 @@ func TestTryLockAfterLock(t *testing.T) { } func TestTryLockUnlock(t *testing.T) { - var m TMutex + var m Mutex if !m.TryLock() { t.Fatal("failed to aquire lock") } -- cgit v1.2.3