]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix use of xadd64
authorAustin Clements <austin@google.com>
Wed, 11 Nov 2015 15:23:44 +0000 (10:23 -0500)
committerAustin Clements <austin@google.com>
Wed, 11 Nov 2015 15:26:24 +0000 (15:26 +0000)
Commit 7407d8e was rebased over the switch to runtime/internal/atomic
and introduced a call to xadd64, which no longer exists. Fix that
call.

Change-Id: I99c93469794c16504ae4a8ffe3066ac382c66a3a
Reviewed-on: https://go-review.googlesource.com/16816
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcsweep.go

index 84b6181b6e840cc7c54f97d8ace8bb23ff13c54d..812ba60f400779811f4e33f144ccde7512d23107 100644 (file)
@@ -392,7 +392,7 @@ func reimburseSweepCredit(unusableBytes uintptr) {
                // Nobody cares about the credit. Avoid the atomic.
                return
        }
-       xadd64(&mheap_.spanBytesAlloc, -int64(unusableBytes))
+       atomic.Xadd64(&mheap_.spanBytesAlloc, -int64(unusableBytes))
 }
 
 func dumpFreeList(s *mspan) {