Import modified f38b2904 of ivmai/libatomic_ops
Merge branch 'atomic'