Added a memory barrier to atomic routines; the need for synchronization between threads is implicit with atomics