diff options
Diffstat (limited to 'pkg/sync')
-rw-r--r-- | pkg/sync/mutex_unsafe.go | 1 | ||||
-rw-r--r-- | pkg/sync/rwmutex_unsafe.go | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/sync/mutex_unsafe.go b/pkg/sync/mutex_unsafe.go index 4e49a9b89..411a80a8a 100644 --- a/pkg/sync/mutex_unsafe.go +++ b/pkg/sync/mutex_unsafe.go @@ -72,6 +72,7 @@ func (m *Mutex) Lock() { // Preconditions: // * m is locked. // * m was locked by this goroutine. +// +checklocksignore func (m *Mutex) Unlock() { noteUnlock(unsafe.Pointer(m)) m.m.Unlock() diff --git a/pkg/sync/rwmutex_unsafe.go b/pkg/sync/rwmutex_unsafe.go index 4cf3fcd6e..892d3e641 100644 --- a/pkg/sync/rwmutex_unsafe.go +++ b/pkg/sync/rwmutex_unsafe.go @@ -105,6 +105,7 @@ func (rw *CrossGoroutineRWMutex) RUnlock() { // TryLock locks rw for writing. It returns true if it succeeds and false // otherwise. It does not block. +// +checklocksignore func (rw *CrossGoroutineRWMutex) TryLock() bool { if RaceEnabled { RaceDisable() @@ -155,6 +156,7 @@ func (rw *CrossGoroutineRWMutex) Lock() { // // Preconditions: // * rw is locked for writing. +// +checklocksignore func (rw *CrossGoroutineRWMutex) Unlock() { if RaceEnabled { RaceRelease(unsafe.Pointer(&rw.writerSem)) @@ -181,6 +183,7 @@ func (rw *CrossGoroutineRWMutex) Unlock() { // // Preconditions: // * rw is locked for writing. +// +checklocksignore func (rw *CrossGoroutineRWMutex) DowngradeLock() { if RaceEnabled { RaceRelease(unsafe.Pointer(&rw.readerSem)) @@ -250,6 +253,7 @@ func (rw *RWMutex) RLock() { // Preconditions: // * rw is locked for reading. // * rw was locked by this goroutine. +// +checklocksignore func (rw *RWMutex) RUnlock() { rw.m.RUnlock() noteUnlock(unsafe.Pointer(rw)) @@ -279,6 +283,7 @@ func (rw *RWMutex) Lock() { // Preconditions: // * rw is locked for writing. // * rw was locked by this goroutine. +// +checklocksignore func (rw *RWMutex) Unlock() { rw.m.Unlock() noteUnlock(unsafe.Pointer(rw)) @@ -288,6 +293,7 @@ func (rw *RWMutex) Unlock() { // // Preconditions: // * rw is locked for writing. +// +checklocksignore func (rw *RWMutex) DowngradeLock() { // No note change for DowngradeLock. rw.m.DowngradeLock() |