summaryrefslogtreecommitdiff
path: root/scripts/atomic/kerneldoc/inc_unless_negative
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/atomic/kerneldoc/inc_unless_negative')
-rw-r--r--scripts/atomic/kerneldoc/inc_unless_negative12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/atomic/kerneldoc/inc_unless_negative b/scripts/atomic/kerneldoc/inc_unless_negative
new file mode 100644
index 000000000000..597f23d4dc8d
--- /dev/null
+++ b/scripts/atomic/kerneldoc/inc_unless_negative
@@ -0,0 +1,12 @@
+cat <<EOF
+/**
+ * ${class}${atomicname}() - atomic increment unless negative with ${desc_order} ordering
+ * @v: pointer to ${atomic}_t
+ *
+ * If (@v >= 0), atomically updates @v to (@v + 1) with ${desc_order} ordering.
+ *
+ * ${desc_noinstr}
+ *
+ * Return: @true if @v was updated, @false otherwise.
+ */
+EOF