added Barrier wrapper and a util macro to use barrier