Is this code really correct when cnt == DISCONNECTED?

Doesn't this need a compare_and_swap to handle that?