aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/atomic/kerneldoc/try_cmpxchg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/atomic/kerneldoc/try_cmpxchg')
-rw-r--r--scripts/atomic/kerneldoc/try_cmpxchg15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/atomic/kerneldoc/try_cmpxchg b/scripts/atomic/kerneldoc/try_cmpxchg
new file mode 100644
index 000000000000..296553206c06
--- /dev/null
+++ b/scripts/atomic/kerneldoc/try_cmpxchg
@@ -0,0 +1,15 @@
+cat <<EOF
+/**
+ * ${class}${atomicname}() - atomic compare and exchange with ${desc_order} ordering
+ * @v: pointer to ${atomic}_t
+ * @old: pointer to ${int} value to compare with
+ * @new: ${int} value to assign
+ *
+ * If (@v == @old), atomically updates @v to @new with ${desc_order} ordering.
+ * Otherwise, updates @old to the current value of @v.
+ *
+ * ${desc_noinstr}
+ *
+ * Return: @true if the exchange occured, @false otherwise.
+ */
+EOF