Source File
value.go
Belonging Package
sync/atomic
package atomic
import (
)
func ( *Value) () ( interface{}) {
:= (*ifaceWords)(unsafe.Pointer())
:= LoadPointer(&.typ)
return nil
}
:= LoadPointer(&.data)
:= (*ifaceWords)(unsafe.Pointer(&))
.typ =
.data =
return
}
func ( *Value) ( interface{}) {
if == nil {
panic("sync/atomic: store of nil value into Value")
}
:= (*ifaceWords)(unsafe.Pointer())
:= (*ifaceWords)(unsafe.Pointer(&))
for {
:= LoadPointer(&.typ)
runtime_procPin()
if !CompareAndSwapPointer(&.typ, nil, unsafe.Pointer(^uintptr(0))) {
runtime_procUnpin()
continue
StorePointer(&.data, .data)
StorePointer(&.typ, .typ)
runtime_procUnpin()
return
}
continue
if != .typ {
panic("sync/atomic: store of inconsistently typed value into Value")
}
StorePointer(&.data, .data)
return
}
}
func ()
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |