- move atomic_* operations to main_unix so that they could use spinlocks or other platform-specific locking mechanisms