Fix endianess for atomic ops