Add barriers and triggers.