Rework the atomic code to reduce the repetition. This merges some of the
authorandrew <andrew@FreeBSD.org>
Tue, 1 Dec 2015 12:27:36 +0000 (12:27 +0000)
committerandrew <andrew@FreeBSD.org>
Tue, 1 Dec 2015 12:27:36 +0000 (12:27 +0000)
commitfaf45ee16f76dd530b199ad0e983ce52079eb11f
tree2ab018eca1b3800bcb048534dd56a543251fde17
parent51dcb97483e1add3f49e864c0e092fabb0849b57
Rework the atomic code to reduce the repetition. This merges some of the
atomic functions where they are almost identical, or have acquire/release
semantics.

While here clean these function up. The cbnz instruction doesn't change
the condition flags so drop cc, however they should have memory added to the
clobber list.

Reviewed by: kib
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4318
sys/arm64/include/atomic.h