summaryrefslogtreecommitdiffhomepage
path: root/pkg/sync/tmutex_unsafe.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-01-22 03:49:16 +0000
committergVisor bot <gvisor-bot@google.com>2020-01-22 03:49:16 +0000
commit86af6e6efa1d0798757fc530c5907985369fa6fe (patch)
treea375a39778431d1ae215b08a8e37bdc5726366bb /pkg/sync/tmutex_unsafe.go
parent4450d973d9b18d7bfc9a7647cc5640440df6de70 (diff)
parent6a59e7f510a7b12f8b3bd768dfe569033ef07d30 (diff)
Merge release-20200115.0-69-g6a59e7f (automated)
Diffstat (limited to 'pkg/sync/tmutex_unsafe.go')
-rwxr-xr-xpkg/sync/tmutex_unsafe.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sync/tmutex_unsafe.go b/pkg/sync/tmutex_unsafe.go
index 3c32f8371..3dd15578b 100755
--- a/pkg/sync/tmutex_unsafe.go
+++ b/pkg/sync/tmutex_unsafe.go
@@ -17,8 +17,8 @@ import (
"unsafe"
)
-// TMutex is a try lock.
-type TMutex struct {
+// Mutex is a try lock.
+type Mutex struct {
sync.Mutex
}
@@ -27,7 +27,7 @@ type syncMutex struct {
sema uint32
}
-func (m *TMutex) state() *int32 {
+func (m *Mutex) state() *int32 {
return &(*syncMutex)(unsafe.Pointer(&m.Mutex)).state
}
@@ -38,7 +38,7 @@ const (
// TryLock tries to aquire the mutex. It returns true if it succeeds and false
// otherwise. TryLock does not block.
-func (m *TMutex) TryLock() bool {
+func (m *Mutex) TryLock() bool {
if atomic.CompareAndSwapInt32(m.state(), mutexUnlocked, mutexLocked) {
if RaceEnabled {
RaceAcquire(unsafe.Pointer(&m.Mutex))