Working barrier functional unit and test code.