/runtime/internal/atomic: fix the Cas64 description

in " bool ·Cas64(uint64 *val, uint64 old, uint64 new)" comment,
the val is a pointer, the old is a uint64 variable,
so it should be if(*val == old) rather than if(*val == *old).
This commit is contained in:
Xing Gao 2021-06-21 22:49:27 +08:00
parent 1de332996c
commit 7e07834abc

View file

@ -65,7 +65,7 @@ TEXT ·Xaddint64(SB), NOSPLIT, $0-20
// bool ·Cas64(uint64 *val, uint64 old, uint64 new)
// Atomically:
// if(*val == *old){
// if(*val == old){
// *val = new;
// return 1;
// } else {