2023-05-10 18:20:35

by Paul E. McKenney

[permalink] [raw]
Subject: [PATCH locking/atomic 11/19] locking/atomic: Add kernel-doc header for arch_${atomic}_set_release

Add kernel-doc header template for arch_${atomic}_set_release
function family.

Signed-off-by: Paul E. McKenney <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Boqun Feng <[email protected]>
Cc: Mark Rutland <[email protected]>
---
include/linux/atomic/atomic-arch-fallback.h | 16 +++++++++++++++-
scripts/atomic/fallbacks/set_release | 7 +++++++
2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/include/linux/atomic/atomic-arch-fallback.h b/include/linux/atomic/atomic-arch-fallback.h
index a90ee496bb81..7ba75143c149 100644
--- a/include/linux/atomic/atomic-arch-fallback.h
+++ b/include/linux/atomic/atomic-arch-fallback.h
@@ -258,6 +258,13 @@ arch_atomic_read_acquire(const atomic_t *v)
#endif

#ifndef arch_atomic_set_release
+/**
+ * arch_atomic_set_release - Atomic store release
+ * @v: pointer of type atomic_t
+ * @i: value to store
+ *
+ * Atomically store @i into *@v with release ordering.
+ */
static __always_inline void
arch_atomic_set_release(atomic_t *v, int i)
{
@@ -1706,6 +1713,13 @@ arch_atomic64_read_acquire(const atomic64_t *v)
#endif

#ifndef arch_atomic64_set_release
+/**
+ * arch_atomic64_set_release - Atomic store release
+ * @v: pointer of type atomic64_t
+ * @i: value to store
+ *
+ * Atomically store @i into *@v with release ordering.
+ */
static __always_inline void
arch_atomic64_set_release(atomic64_t *v, s64 i)
{
@@ -3132,4 +3146,4 @@ arch_atomic64_dec_if_positive(atomic64_t *v)
#endif

#endif /* _LINUX_ATOMIC_FALLBACK_H */
-// 3fd0ec685588b84c6428145b7628f79ce23a464c
+// c46693a9f3b3ceacef003cd42764251148e3457d
diff --git a/scripts/atomic/fallbacks/set_release b/scripts/atomic/fallbacks/set_release
index 05cdb7f42477..46effb6203e5 100755
--- a/scripts/atomic/fallbacks/set_release
+++ b/scripts/atomic/fallbacks/set_release
@@ -1,4 +1,11 @@
cat <<EOF
+/**
+ * arch_${atomic}_set_release - Atomic store release
+ * @v: pointer of type ${atomic}_t
+ * @i: value to store
+ *
+ * Atomically store @i into *@v with release ordering.
+ */
static __always_inline void
arch_${atomic}_set_release(${atomic}_t *v, ${int} i)
{
--
2.40.1