[<prev] [next>] [day] [month] [year] [list]
Message-ID: <176830140333.510.1571175755033980626.tip-bot2@tip-bot2>
Date: Tue, 13 Jan 2026 10:50:03 -0000
From: "tip-bot2 for FUJITA Tomonori" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Alice Ryhl <aliceryhl@...gle.com>,
FUJITA Tomonori <fujita.tomonori@...il.com>, Gary Guo <gary@...yguo.net>,
Boqun Feng <boqun.feng@...il.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: locking/core] rust: helpers: Add i8/i16 atomic xchg_relaxed helpers
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 910cbddc416cc30d83966baf378f44e59f3dc5d7
Gitweb: https://git.kernel.org/tip/910cbddc416cc30d83966baf378f44e59f3dc5d7
Author: FUJITA Tomonori <fujita.tomonori@...il.com>
AuthorDate: Tue, 23 Dec 2025 15:21:40 +09:00
Committer: Boqun Feng <boqun.feng@...il.com>
CommitterDate: Fri, 09 Jan 2026 19:01:41 +08:00
rust: helpers: Add i8/i16 atomic xchg_relaxed helpers
Add i8/i16 atomic xchg_relaxed helpers that call xchg_relaxed() macro
implementing atomic xchg_relaxed using architecture-specific
instructions.
[boqun: Use xchg_relaxed() instead of raw_xchg_relaxed()]
Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@...il.com>
Reviewed-by: Gary Guo <gary@...yguo.net>
Signed-off-by: Boqun Feng <boqun.feng@...il.com>
Link: https://patch.msgid.link/20251223062140.938325-5-fujita.tomonori@gmail.com
---
rust/helpers/atomic_ext.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/rust/helpers/atomic_ext.c b/rust/helpers/atomic_ext.c
index 2b976a7..76e392c 100644
--- a/rust/helpers/atomic_ext.c
+++ b/rust/helpers/atomic_ext.c
@@ -80,3 +80,13 @@ __rust_helper s16 rust_helper_atomic_i16_xchg_release(s16 *ptr, s16 new)
{
return xchg_release(ptr, new);
}
+
+__rust_helper s8 rust_helper_atomic_i8_xchg_relaxed(s8 *ptr, s8 new)
+{
+ return xchg_relaxed(ptr, new);
+}
+
+__rust_helper s16 rust_helper_atomic_i16_xchg_relaxed(s16 *ptr, s16 new)
+{
+ return xchg_relaxed(ptr, new);
+}
Powered by blists - more mailing lists