use relaxed memory model for atom_*()
RP atomic access fixes
missing sem_destroy()