Skip to content

Commit 7d1d642

Browse files
committed
runtime: fix use of xadd64
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 <[email protected]> Reviewed-by: Rick Hudson <[email protected]>
1 parent 7407d8e commit 7d1d642

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/mgcsweep.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ func reimburseSweepCredit(unusableBytes uintptr) {
392392
// Nobody cares about the credit. Avoid the atomic.
393393
return
394394
}
395-
xadd64(&mheap_.spanBytesAlloc, -int64(unusableBytes))
395+
atomic.Xadd64(&mheap_.spanBytesAlloc, -int64(unusableBytes))
396396
}
397397

398398
func dumpFreeList(s *mspan) {

0 commit comments

Comments
 (0)