Revise atomic register code.