]> Cypherpunks repositories - gostls13.git/commit
runtime: make sync_atomic_SwapPointer signature match sync/atomic
authorAustin Clements <austin@google.com>
Wed, 13 Apr 2016 19:06:01 +0000 (15:06 -0400)
committerAustin Clements <austin@google.com>
Thu, 14 Apr 2016 21:13:23 +0000 (21:13 +0000)
commit8f6c35de2f7c972a4f34efddd21281b7060c4457
tree3bf7ee2793018f228299ea9fdcfff511e158672b
parent98b6febcef8f6d7411a77e9e828df681871a28ad
runtime: make sync_atomic_SwapPointer signature match sync/atomic

SwapPointer is declared as

  func SwapPointer(addr *unsafe.Pointer, new unsafe.Pointer) (old unsafe.Pointer)

in sync/atomic, but defined in the runtime (where it's actually
implemented) as

  func sync_atomic_SwapPointer(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer

Make ptr a *unsafe.Pointer in the runtime definition to match the type
in sync/atomic.

Change-Id: I99bab651b995001bbe54f9e790fdef2417ef0e9e
Reviewed-on: https://go-review.googlesource.com/21998
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/runtime/atomic_pointer.go