diff options
Diffstat (limited to 'scripts/atomic/fallbacks/add_unless')
-rwxr-xr-x | scripts/atomic/fallbacks/add_unless | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/atomic/fallbacks/add_unless b/scripts/atomic/fallbacks/add_unless index 9e5159c2ccfc..87ed46cb6987 100755 --- a/scripts/atomic/fallbacks/add_unless +++ b/scripts/atomic/fallbacks/add_unless @@ -1,3 +1,5 @@ +if /bin/sh ${ATOMICDIR}/chkdup.sh arch_${atomic}_add_unless add_unless +then cat << EOF /** * arch_${atomic}_add_unless - add unless the number is already a given value @@ -5,9 +7,12 @@ cat << EOF * @a: the amount to add to v... * @u: ...unless v is equal to u. * - * Atomically adds @a to @v, if @v was not already @u. - * Returns true if the addition was done. + * Atomically adds @a to @v with full ordering, but only if @v was not already @u. + * Returns @true if the addition was done. */ +EOF +fi +cat << EOF static __always_inline bool arch_${atomic}_add_unless(${atomic}_t *v, ${int} a, ${int} u) { |