From 5385e2386b64b10960c1b40113ee7dae271c8369 Mon Sep 17 00:00:00 2001 From: Mia Zhu Date: Mon, 28 Jun 2021 17:10:56 +0000 Subject: [PATCH] runtime/internal/atomic: drop Cas64 pointer indirection in comments Change-Id: Ieff0065cbd81e045594ce12e10338b0666816d70 GitHub-Last-Rev: d842f5cb3e5d75f87957c068f6accc9d4a4ac224 GitHub-Pull-Request: golang/go#46949 Reviewed-on: https://go-review.googlesource.com/c/go/+/331309 Trust: Keith Randall Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- src/runtime/internal/atomic/atomic_amd64.s | 2 +- src/runtime/internal/atomic/atomic_arm64.s | 2 +- src/runtime/internal/atomic/atomic_mips64x.s | 2 +- src/runtime/internal/atomic/atomic_ppc64x.s | 2 +- src/runtime/internal/atomic/atomic_riscv64.s | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/runtime/internal/atomic/atomic_amd64.s b/src/runtime/internal/atomic/atomic_amd64.s index 57cd59dd8cc..d21514b36b9 100644 --- a/src/runtime/internal/atomic/atomic_amd64.s +++ b/src/runtime/internal/atomic/atomic_amd64.s @@ -37,7 +37,7 @@ TEXT ·Cas(SB),NOSPLIT,$0-17 // bool ·Cas64(uint64 *val, uint64 old, uint64 new) // Atomically: -// if(*val == *old){ +// if(*val == old){ // *val = new; // return 1; // } else { diff --git a/src/runtime/internal/atomic/atomic_arm64.s b/src/runtime/internal/atomic/atomic_arm64.s index e9467afecd7..5f77d92deba 100644 --- a/src/runtime/internal/atomic/atomic_arm64.s +++ b/src/runtime/internal/atomic/atomic_arm64.s @@ -192,7 +192,7 @@ ok: // bool ·Cas64(uint64 *ptr, uint64 old, uint64 new) // Atomically: -// if(*val == *old){ +// if(*val == old){ // *val = new; // return 1; // } else { diff --git a/src/runtime/internal/atomic/atomic_mips64x.s b/src/runtime/internal/atomic/atomic_mips64x.s index fba668f94a8..fedfc4a175c 100644 --- a/src/runtime/internal/atomic/atomic_mips64x.s +++ b/src/runtime/internal/atomic/atomic_mips64x.s @@ -37,7 +37,7 @@ cas_fail: // bool cas64(uint64 *ptr, uint64 old, uint64 new) // Atomically: -// if(*val == *old){ +// if(*val == old){ // *val = new; // return 1; // } else { diff --git a/src/runtime/internal/atomic/atomic_ppc64x.s b/src/runtime/internal/atomic/atomic_ppc64x.s index dca26cb334a..226b3b62162 100644 --- a/src/runtime/internal/atomic/atomic_ppc64x.s +++ b/src/runtime/internal/atomic/atomic_ppc64x.s @@ -107,7 +107,7 @@ cas_fail: // bool ·Cas64(uint64 *ptr, uint64 old, uint64 new) // Atomically: -// if(*val == *old){ +// if(*val == old){ // *val = new; // return 1; // } else { diff --git a/src/runtime/internal/atomic/atomic_riscv64.s b/src/runtime/internal/atomic/atomic_riscv64.s index ec05302a784..21d5adcdbc5 100644 --- a/src/runtime/internal/atomic/atomic_riscv64.s +++ b/src/runtime/internal/atomic/atomic_riscv64.s @@ -30,8 +30,9 @@ #include "textflag.h" +// func Cas(ptr *uint64, old, new uint64) bool // Atomically: -// if(*val == *old){ +// if(*val == old){ // *val = new; // return 1; // } else {