locking/atomic: make atomic*_{cmp,}xchg optional
[linux-2.6-microblaze.git] / scripts / atomic / fallbacks / xchg
diff --git a/scripts/atomic/fallbacks/xchg b/scripts/atomic/fallbacks/xchg
new file mode 100644 (file)
index 0000000..733b898
--- /dev/null
@@ -0,0 +1,7 @@
+cat <<EOF
+static __always_inline ${int}
+arch_${atomic}_xchg${order}(${atomic}_t *v, ${int} new)
+{
+       return arch_xchg${order}(&v->counter, new);
+}
+EOF