resolved comments

This commit is contained in:
Prabhav Dogra 2025-03-07 14:55:24 +05:30
parent 7ff3071eb9
commit 8ab3720889
10 changed files with 55 additions and 55 deletions

View File

@ -64,10 +64,10 @@ TEXT ·Xaddint32(SB), NOSPLIT, $0-12
TEXT ·Xaddint64(SB), NOSPLIT, $0-20
JMP ·Xadd64(SB)
// func Cas64(val *uint64, old, new uint64) bool
// func Cas64(ptr *uint64, old, new uint64) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false
@ -87,10 +87,10 @@ TEXT ·Cas64(SB), NOSPLIT, $0-21
SETEQ ret+20(FP)
RET
// func Casp1(p *unsafe.Pointer, old, new unsafe.Pointer) bool
// func Casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
// Atomically:
// if *p == old {
// *p = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -19,12 +19,12 @@ TEXT ·Loadint32(SB), NOSPLIT, $0-12
TEXT ·Loadint64(SB), NOSPLIT, $0-16
JMP ·Load64(SB)
// func Cas(val *int32, old, new int32) bool
// func Cas(ptr *int32, old, new int32) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else
// } else {
// return false
// }
TEXT ·Cas(SB),NOSPLIT,$0-17
@ -36,10 +36,10 @@ TEXT ·Cas(SB),NOSPLIT,$0-17
SETEQ ret+16(FP)
RET
// func Cas64(val *uint64, old, new uint64) bool
// func Cas64(ptr *uint64, old, new uint64) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false
@ -53,10 +53,10 @@ TEXT ·Cas64(SB), NOSPLIT, $0-25
SETEQ ret+24(FP)
RET
// func Casp1(val *unsafe.Pointer, old, new unsafe.Pointer) bool
// func Casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -6,10 +6,10 @@
#include "textflag.h"
#include "funcdata.h"
// func armcas(val *int32, old, new int32) bool
// func armcas(ptr *int32, old, new int32) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -192,10 +192,10 @@ load_store_loop:
RET
#endif
// func Cas(val *uint32, old, new uint32) bool
// func Cas(ptr *uint32, old, new uint32) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false
@ -227,10 +227,10 @@ ok:
RET
#endif
// func Cas64(val *uint64, old, new uint64) bool
// func Cas64(ptr *uint64, old, new uint64) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -120,10 +120,10 @@ TEXT ·Xaddint32(SB),NOSPLIT,$0-20
TEXT ·Xaddint64(SB), NOSPLIT, $0-24
JMP ·Xadd64(SB)
// func Casp(val *unsafe.Pointer, old, new unsafe.Pointer) bool
// func Casp(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -8,10 +8,10 @@
#define SYNC WORD $0xf
// func cas(val *uint32, old, new uint32) bool
// func cas(ptr *uint32, old, new uint32) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false
@ -35,10 +35,10 @@ cas_fail:
MOVV $0, R1
JMP -4(PC)
// func Cas64(val *uint64, old, new uint64) bool
// func Cas64(ptr *uint64, old, new uint64) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false
@ -104,10 +104,10 @@ TEXT ·Xaddint32(SB), NOSPLIT, $0-20
TEXT ·Xaddint64(SB), NOSPLIT, $0-24
JMP ·Xadd64(SB)
// func Casp1(val *unsafe.Pointer, old, new unsafe.Pointer) bool
// func Casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -6,10 +6,10 @@
#include "textflag.h"
// func Cas(val *int32, old, new int32) bool
// func Cas(ptr *int32, old, new int32) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -78,10 +78,10 @@ TEXT ·LoadAcq64(SB),NOSPLIT|NOFRAME,$-8-16
MOVD R3, ret+8(FP)
RET
// func Cas(val *int32, old, new int32) bool
// func Cas(ptr *int32, old, new int32) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false
@ -106,10 +106,10 @@ cas_fail:
MOVB R0, ret+16(FP)
RET
// func Cas64(val *uint64, old, new uint64) bool
// func Cas64(ptr *uint64, old, new uint64) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false
@ -197,10 +197,10 @@ TEXT ·Xaddint32(SB), NOSPLIT, $0-20
TEXT ·Xaddint64(SB), NOSPLIT, $0-24
BR ·Xadd64(SB)
// func Casp1(val *unsafe.Pointer, old, new unsafe.Pointer) bool
// func Casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -30,10 +30,10 @@
#include "textflag.h"
// func Cas(val *uint64, old, new uint64) bool
// func Cas(ptr *uint64, old, new uint64) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false

View File

@ -7,10 +7,10 @@
#include "textflag.h"
// TODO(minux): this is only valid for ARMv6+
// func armcas(val *int32, old int32, new int32) bool
// func armcas(ptr *int32, old int32, new int32) bool
// Atomically:
// if *val == old {
// *val = new
// if *ptr == old {
// *ptr = new
// return true
// } else {
// return false