Implement and_atomicptr