hopefully faster barrier implementation
fixed codegen for barriers