Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v1 0/4] rust: Add i8/i16 atomic xchg helpers
@ 2025-12-17 21:37 FUJITA Tomonori
  2025-12-17 21:37 ` [PATCH v1 1/4] rust: helpers: " FUJITA Tomonori
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: FUJITA Tomonori @ 2025-12-17 21:37 UTC (permalink / raw)
  To: boqun.feng, ojeda, peterz, will
  Cc: acourbot, a.hindborg, aliceryhl, bjorn3_gh, dakr, gary, lossin,
	mark.rutland, tmgross, rust-for-linux

This adds atomic xchg helpers with full, acquire, release, and relaxed
orderings in preparation for i8/i16 atomic xchg support.

The architectures supporting Rust, implement atomic xchg families
using architecture-specific instructions. So the helpers just call
them.

Note that the architectures that support Rust handle xchg differently:

- arm64 and riscv support xchg with all the orderings.

- x86_64 and loongarch support only full-ordering xchg. They calls the
  full-ordering xchg for any orderings.

- arm v7 supports only relaxed-odering xchg. It uses __atomic_op_
 macros to add barriers properly.

FUJITA Tomonori (4):
  rust: helpers: Add i8/i16 atomic xchg helpers
  rust: helpers: Add i8/i16 atomic xchg_acquire helpers
  rust: helpers: Add i8/i16 atomic xchg_release helpers
  rust: helpers: Add i8/i16 atomic xchg_relaxed helpers

 rust/helpers/atomic_ext.c | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)


base-commit: 02c5c8c11bbd34cdd9c566dd4ecca48995c09621
-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-12-18 11:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17 21:37 [PATCH v1 0/4] rust: Add i8/i16 atomic xchg helpers FUJITA Tomonori
2025-12-17 21:37 ` [PATCH v1 1/4] rust: helpers: " FUJITA Tomonori
2025-12-17 21:37 ` [PATCH v1 2/4] rust: helpers: Add i8/i16 atomic xchg_acquire helpers FUJITA Tomonori
2025-12-17 21:37 ` [PATCH v1 3/4] rust: helpers: Add i8/i16 atomic xchg_release helpers FUJITA Tomonori
2025-12-17 21:37 ` [PATCH v1 4/4] rust: helpers: Add i8/i16 atomic xchg_relaxed helpers FUJITA Tomonori
2025-12-18  8:03 ` [PATCH v1 0/4] rust: Add i8/i16 atomic xchg helpers Alice Ryhl
2025-12-18  9:18 ` Boqun Feng
2025-12-18 11:08   ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox