used barrier_wait instead of sync(), done with ov6