barrier-first routine