Update barrier.cpp