It could be if you packed both tos variables into a single atomic and the compare and swapped the combined value.