Added atomic add and read functions.