Added barrier hook/unhook on pushing and popping barriers.
Self-review