locking/atomics: Flip fallbacks and instrumentation
[linux-2.6-microblaze.git] / scripts / atomic / fallbacks / fetch_add_unless
index fffbc0d..0e0b9ae 100755 (executable)
@@ -1,6 +1,6 @@
 cat << EOF
 /**
- * ${atomic}_fetch_add_unless - add unless the number is already a given value
+ * ${arch}${atomic}_fetch_add_unless - add unless the number is already a given value
  * @v: pointer of type ${atomic}_t
  * @a: the amount to add to v...
  * @u: ...unless v is equal to u.
@@ -9,14 +9,14 @@ cat << EOF
  * Returns original value of @v
  */
 static __always_inline ${int}
-${atomic}_fetch_add_unless(${atomic}_t *v, ${int} a, ${int} u)
+${arch}${atomic}_fetch_add_unless(${atomic}_t *v, ${int} a, ${int} u)
 {
-       ${int} c = ${atomic}_read(v);
+       ${int} c = ${arch}${atomic}_read(v);
 
        do {
                if (unlikely(c == u))
                        break;
-       } while (!${atomic}_try_cmpxchg(v, &c, c + a));
+       } while (!${arch}${atomic}_try_cmpxchg(v, &c, c + a));
 
        return c;
 }