Properly use the size_t variants of the atomic functions