Merge pull request #5747 from lhchavez/atomic-tests Homogenize semantics for atomic-related functions