Add macros for generic atomic functionality