diff options
author | Ian Gudger <igudger@google.com> | 2020-01-21 19:23:26 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-21 19:36:12 -0800 |
commit | 6a59e7f510a7b12f8b3bd768dfe569033ef07d30 (patch) | |
tree | f3230ab8459461bff3449db656aa9ccff1a7af5e /pkg/sync/tmutex_test.go | |
parent | d0e75f2bef4e16356693987db6ae6bbdce749618 (diff) |
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
Diffstat (limited to 'pkg/sync/tmutex_test.go')
-rw-r--r-- | pkg/sync/tmutex_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
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") } |