Simple Cyclic Barrier in C