modify mutex
adding barrier