[ARCH] add atomic functions

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>