summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2023-05-02 16:29:40 -0700
committerPaul E. McKenney <paulmck@kernel.org>2023-05-10 10:45:34 -0700
commitf4bfc0b600cecd02a1bcc643ad933fc22072b985 (patch)
tree46d10fc7ec48836b516233e6602aaba2b4a40511 /scripts
parente5b9f4b891695ce9ce0aa43dafbcf814965ec9e4 (diff)
downloadlinux-next-f4bfc0b600cecd02a1bcc643ad933fc22072b985.tar.gz
locking/atomic: Add kernel-doc header for arch_${atomic}_inc_unless_negative
Add kernel-doc header template for arch_${atomic}_inc_unless_negative function family. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Will Deacon <will@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/atomic/fallbacks/inc_unless_negative8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/atomic/fallbacks/inc_unless_negative b/scripts/atomic/fallbacks/inc_unless_negative
index 95d8ce48233f..98830b0dcdb1 100755
--- a/scripts/atomic/fallbacks/inc_unless_negative
+++ b/scripts/atomic/fallbacks/inc_unless_negative
@@ -1,4 +1,12 @@
cat <<EOF
+/**
+ * arch_${atomic}_inc_unless_negative - Atomic increment if old value is non-negative
+ * @v: pointer of type ${atomic}_t
+ *
+ * Atomically increment @v, but only if the original value is greater
+ * than or equal to zero. Return @true if the increment happened and
+ * @false otherwise.
+ */
static __always_inline bool
arch_${atomic}_inc_unless_negative(${atomic}_t *v)
{