mirror of
https://github.com/golang/go
synced 2024-11-26 16:36:49 -07:00
runtime/internal/atomic: drop Cas64 pointer indirection in comments
Change-Id: Ieff0065cbd81e045594ce12e10338b0666816d70
GitHub-Last-Rev: d842f5cb3e
GitHub-Pull-Request: golang/go#46949
Reviewed-on: https://go-review.googlesource.com/c/go/+/331309
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
956c81bfe6
commit
5385e2386b
@ -37,7 +37,7 @@ TEXT ·Cas(SB),NOSPLIT,$0-17
|
|||||||
|
|
||||||
// bool ·Cas64(uint64 *val, uint64 old, uint64 new)
|
// bool ·Cas64(uint64 *val, uint64 old, uint64 new)
|
||||||
// Atomically:
|
// Atomically:
|
||||||
// if(*val == *old){
|
// if(*val == old){
|
||||||
// *val = new;
|
// *val = new;
|
||||||
// return 1;
|
// return 1;
|
||||||
// } else {
|
// } else {
|
||||||
|
@ -192,7 +192,7 @@ ok:
|
|||||||
|
|
||||||
// bool ·Cas64(uint64 *ptr, uint64 old, uint64 new)
|
// bool ·Cas64(uint64 *ptr, uint64 old, uint64 new)
|
||||||
// Atomically:
|
// Atomically:
|
||||||
// if(*val == *old){
|
// if(*val == old){
|
||||||
// *val = new;
|
// *val = new;
|
||||||
// return 1;
|
// return 1;
|
||||||
// } else {
|
// } else {
|
||||||
|
@ -37,7 +37,7 @@ cas_fail:
|
|||||||
|
|
||||||
// bool cas64(uint64 *ptr, uint64 old, uint64 new)
|
// bool cas64(uint64 *ptr, uint64 old, uint64 new)
|
||||||
// Atomically:
|
// Atomically:
|
||||||
// if(*val == *old){
|
// if(*val == old){
|
||||||
// *val = new;
|
// *val = new;
|
||||||
// return 1;
|
// return 1;
|
||||||
// } else {
|
// } else {
|
||||||
|
@ -107,7 +107,7 @@ cas_fail:
|
|||||||
|
|
||||||
// bool ·Cas64(uint64 *ptr, uint64 old, uint64 new)
|
// bool ·Cas64(uint64 *ptr, uint64 old, uint64 new)
|
||||||
// Atomically:
|
// Atomically:
|
||||||
// if(*val == *old){
|
// if(*val == old){
|
||||||
// *val = new;
|
// *val = new;
|
||||||
// return 1;
|
// return 1;
|
||||||
// } else {
|
// } else {
|
||||||
|
@ -30,8 +30,9 @@
|
|||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
// func Cas(ptr *uint64, old, new uint64) bool
|
||||||
// Atomically:
|
// Atomically:
|
||||||
// if(*val == *old){
|
// if(*val == old){
|
||||||
// *val = new;
|
// *val = new;
|
||||||
// return 1;
|
// return 1;
|
||||||
// } else {
|
// } else {
|
||||||
|
Loading…
Reference in New Issue
Block a user