ring/c11: move atomic load of head above the loop