diff options
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) } |