Esempio n. 1
0
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
	}
}
Esempio n. 2
0
func (t *terminal) waittx() {
	barrier.Compiler()
	for t.siz.tx != 0 {
		barrier.Compiler()
	}
}
Esempio n. 3
0
// Loop can be used to perform short active delay.
func Loop(n int) {
	for n > 0 {
		n--
		barrier.Compiler()
	}
}
Esempio n. 4
0
func (t *terminal) waitrx() {
	barrier.Compiler()
	for t.siz.rx == 0 {
		barrier.Compiler()
	}
}