summaryrefslogtreecommitdiff
path: root/scripts/atomic/kerneldoc/dec_unless_positive
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/atomic/kerneldoc/dec_unless_positive')
-rw-r--r--scripts/atomic/kerneldoc/dec_unless_positive12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/atomic/kerneldoc/dec_unless_positive b/scripts/atomic/kerneldoc/dec_unless_positive
new file mode 100644
index 000000000000..ee73612f0354
--- /dev/null
+++ b/scripts/atomic/kerneldoc/dec_unless_positive
@@ -0,0 +1,12 @@
+cat <<EOF
+/**
+ * ${class}${atomicname}() - atomic decrement unless positive 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