存储

  • 存储相关的原子函数 第一个参数表示待操作变量对应的指针,第二个参数表示要存储到待操作变量的数值:
    func StoreInt32(addr *int32, val int32)
    func StoreInt64(addr *int64, val int64)
    func StorePointer(addr *unsafe.Pointer, val unsafe.Pointer)
    func StoreUint32(addr *uint32, val uint32)
    func StoreUint64(addr *uint64, val uint64)
    func StoreUintptr(addr *uintptr, val uintptr)
StoreInt32y