addr := (*int32)(unsafe.Pointer(uaddr))
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadInt32(addr)
if CompareAndSwapInt32(addr, v, v+1) {
break
}
func hammerCompareAndSwapUint32(addr *uint32, count int) {
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadUint32(addr)
if CompareAndSwapUint32(addr, v, v+1) {
break
}
addr := (*uintptr)(unsafe.Pointer(uaddr))
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadUintptr(addr)
if CompareAndSwapUintptr(addr, v, v+1) {
break
}
addr := (*unsafe.Pointer)(unsafe.Pointer(uaddr))
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadPointer(addr)
if CompareAndSwapPointer(addr, v, unsafe.Pointer(uintptr(v)+1)) {
break
}
addr := (*int64)(unsafe.Pointer(uaddr))
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadInt64(addr)
if CompareAndSwapInt64(addr, v, v+1) {
break
}
func hammerCompareAndSwapUint64(addr *uint64, count int) {
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadUint64(addr)
if CompareAndSwapUint64(addr, v, v+1) {
break
}
addr := (*uintptr)(unsafe.Pointer(uaddr))
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadUintptr(addr)
if CompareAndSwapUintptr(addr, v, v+1) {
break
}
addr := (*unsafe.Pointer)(unsafe.Pointer(uaddr))
for i := 0; i < count; i++ {
for {
- v := *addr
+ v := LoadPointer(addr)
if CompareAndSwapPointer(addr, v, unsafe.Pointer(uintptr(v)+1)) {
break
}