From d497eeb00540cebe5fb875570a06cc0083e8016b Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 27 Aug 2015 10:59:43 +1200 Subject: runtime: remove unused xchgp/xchgp1 I noticed that they were unimplemented on arm64 but then that they were in fact not used at all. Change-Id: Iee579feda2a5e374fa571bcc8c89e4ef607d50f6 Reviewed-on: https://go-review.googlesource.com/13951 Run-TryBot: Minux Ma TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/runtime/atomic_pointer.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/runtime/atomic_pointer.go') diff --git a/src/runtime/atomic_pointer.go b/src/runtime/atomic_pointer.go index f84afe0362..ec2ea8a338 100644 --- a/src/runtime/atomic_pointer.go +++ b/src/runtime/atomic_pointer.go @@ -10,7 +10,7 @@ import "unsafe" // because while ptr does not escape, new does. // If new is marked as not escaping, the compiler will make incorrect // escape analysis decisions about the pointer value being stored. -// Instead, these are wrappers around the actual atomics (xchgp1 and so on) +// Instead, these are wrappers around the actual atomics (casp1 and so on) // that use noescape to convey which arguments do not escape. // // Additionally, these functions must update the shadow heap for @@ -22,13 +22,6 @@ func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) { writebarrierptr_nostore((*uintptr)(ptr), uintptr(new)) } -//go:nosplit -func xchgp(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer { - old := xchgp1(noescape(ptr), new) - writebarrierptr_nostore((*uintptr)(ptr), uintptr(new)) - return old -} - //go:nosplit func casp(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool { if !casp1((*unsafe.Pointer)(noescape(unsafe.Pointer(ptr))), noescape(old), new) { -- cgit v1.3