]> Git Repo - linux.git/blob - scripts/atomic/fallbacks/add_unless
KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl
[linux.git] / scripts / atomic / fallbacks / add_unless
1 cat << EOF
2 /**
3  * ${arch}${atomic}_add_unless - add unless the number is already a given value
4  * @v: pointer of type ${atomic}_t
5  * @a: the amount to add to v...
6  * @u: ...unless v is equal to u.
7  *
8  * Atomically adds @a to @v, if @v was not already @u.
9  * Returns true if the addition was done.
10  */
11 static __always_inline bool
12 ${arch}${atomic}_add_unless(${atomic}_t *v, ${int} a, ${int} u)
13 {
14         return ${arch}${atomic}_fetch_add_unless(v, a, u) != u;
15 }
16 EOF
This page took 0.033256 seconds and 4 git commands to generate.