- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for CompareAndSwapNoWB (0.26 sec)
-
src/internal/runtime/atomic/types.go
// hide pointers from the GC. Use with care and sparingly. // It is safe to use with values not found in the Go heap. // Prefer CompareAndSwap instead. // //go:nosplit func (p *Pointer[T]) CompareAndSwapNoWB(old, new *T) bool { return p.u.CompareAndSwapNoWB(unsafe.Pointer(old), unsafe.Pointer(new)) } // CompareAndSwap atomically (with respect to other methods) // compares u's value with old, and if they're equal,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 14.2K bytes - Viewed (0) -
src/runtime/trace.go
func ReadTrace() []byte { top: var buf []byte var park bool systemstack(func() { buf, park = readTrace0() }) if park { gopark(func(gp *g, _ unsafe.Pointer) bool { if !trace.reader.CompareAndSwapNoWB(nil, gp) { // We're racing with another reader. // Wake up and handle this case. return false } if g2 := traceReader(); gp == g2 { // New data arrived between unlocking
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 37.1K bytes - Viewed (0)