func loadTicks() uint64 { aba := atomic.LoadUintptr(&ticksABA) for { barrier.Compiler() t := ticks[aba&1] barrier.Compiler() aba1 := atomic.LoadUintptr(&ticksABA) if aba == aba1 { return t } aba = aba1 } }
func (t *terminal) waittx() { barrier.Compiler() for t.siz.tx != 0 { barrier.Compiler() } }
// Loop can be used to perform short active delay. func Loop(n int) { for n > 0 { n-- barrier.Compiler() } }
func (t *terminal) waitrx() { barrier.Compiler() for t.siz.rx == 0 { barrier.Compiler() } }