Replace racy half-open increment-if-zero with a compare-and-swap
Merge pull request #2 from willglynn/halfopen_race

Replace racy half-open increment-if-zero with a compare-and-swap