Computer synchronization mechanism that enforces an ordering on operations before and after the barrier