diff options
author | Wim <wim@42.be> | 2021-12-12 00:05:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 00:05:15 +0100 |
commit | 3893a035be347a7687a41d2054dd1b274d3a0504 (patch) | |
tree | dfe4a3bf72a0a6356e51bd8fc2e88e9a26e52331 /vendor/go.uber.org/atomic/unsafe_pointer.go | |
parent | 658bdd9faa835660ae407331732e9d93d8f6443b (diff) | |
download | matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.gz matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.bz2 matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.zip |
Update dependencies/vendor (#1659)
Diffstat (limited to 'vendor/go.uber.org/atomic/unsafe_pointer.go')
-rw-r--r-- | vendor/go.uber.org/atomic/unsafe_pointer.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/go.uber.org/atomic/unsafe_pointer.go b/vendor/go.uber.org/atomic/unsafe_pointer.go index a3830c66..169f793d 100644 --- a/vendor/go.uber.org/atomic/unsafe_pointer.go +++ b/vendor/go.uber.org/atomic/unsafe_pointer.go @@ -33,8 +33,8 @@ type UnsafePointer struct { } // NewUnsafePointer creates a new UnsafePointer. -func NewUnsafePointer(p unsafe.Pointer) *UnsafePointer { - return &UnsafePointer{v: p} +func NewUnsafePointer(val unsafe.Pointer) *UnsafePointer { + return &UnsafePointer{v: val} } // Load atomically loads the wrapped value. @@ -43,16 +43,16 @@ func (p *UnsafePointer) Load() unsafe.Pointer { } // Store atomically stores the passed value. -func (p *UnsafePointer) Store(q unsafe.Pointer) { - atomic.StorePointer(&p.v, q) +func (p *UnsafePointer) Store(val unsafe.Pointer) { + atomic.StorePointer(&p.v, val) } // Swap atomically swaps the wrapped unsafe.Pointer and returns the old value. -func (p *UnsafePointer) Swap(q unsafe.Pointer) unsafe.Pointer { - return atomic.SwapPointer(&p.v, q) +func (p *UnsafePointer) Swap(val unsafe.Pointer) (old unsafe.Pointer) { + return atomic.SwapPointer(&p.v, val) } // CAS is an atomic compare-and-swap. -func (p *UnsafePointer) CAS(old, new unsafe.Pointer) bool { +func (p *UnsafePointer) CAS(old, new unsafe.Pointer) (swapped bool) { return atomic.CompareAndSwapPointer(&p.v, old, new) } |