}
// Load accesses and returns the value atomically.
+//
+//go:nosplit
func (u *Uint8) Load() uint8 {
return Load8(&u.value)
}
}
// Load accesses and returns the value atomically.
+//
+//go:nosplit
func (b *Bool) Load() bool {
return b.u.Load() != 0
}
}
// Load accesses and returns the value atomically.
+//
+//go:nosplit
func (u *Uint32) Load() uint32 {
return Load(&u.value)
}
// on this thread can be observed to occur before it.
//
// WARNING: Use sparingly and with great care.
+//
+//go:nosplit
func (u *Uint32) LoadAcquire() uint32 {
return LoadAcq(&u.value)
}
}
// Load accesses and returns the value atomically.
+//
+//go:nosplit
func (u *Uint64) Load() uint64 {
return Load64(&u.value)
}
//
// This operation wraps around in the usual
// two's-complement way.
+//
+//go:nosplit
func (u *Uint64) Add(delta int64) uint64 {
return Xadd64(&u.value, delta)
}
// on this thread can be observed to occur before it.
//
// WARNING: Use sparingly and with great care.
+//
+//go:nosplit
func (u *Uintptr) LoadAcquire() uintptr {
return LoadAcquintptr(&u.value)
}
}
// Load accesses and returns the value atomically.
+//
+//go:nosplit
func (f *Float64) Load() float64 {
r := f.u.Load()
return *(*float64)(unsafe.Pointer(&r))
}
// Load accesses and returns the value atomically.
+//
+//go:nosplit
func (u *UnsafePointer) Load() unsafe.Pointer {
return Loadp(unsafe.Pointer(&u.value))
}
}
// Load accesses and returns the value atomically.
+//
+//go:nosplit
func (p *Pointer[T]) Load() *T {
return (*T)(p.u.Load())
}