Generic Linux architectural discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add atomic bool support
@ 2026-01-01  3:49 FUJITA Tomonori
  2026-01-01  3:49 ` [PATCH v2 1/2] rust: sync: atomic: Add atomic bool support via i8 representation FUJITA Tomonori
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: FUJITA Tomonori @ 2026-01-01  3:49 UTC (permalink / raw)
  To: boqun.feng, ojeda
  Cc: a.hindborg, aliceryhl, bjorn3_gh, dakr, gary, lossin, tmgross,
	acourbot, rust-for-linux, linux-arch

This adds `bool` support to the Rust LKMM atomics.

Rust specifies that `bool` has size 1 and alignment 1 [1], so it can
be represented using an `i8` backing type.

[1] https://doc.rust-lang.org/reference/types/boolean.html

v2:
- remove AtomicImpl
- remove Safety comment about the bit patterns
- remove from_ptr() comment in cover letter
v1: https://lore.kernel.org/rust-for-linux/20251230045028.1773445-1-fujita.tomonori@gmail.com/


FUJITA Tomonori (2):
  rust: sync: atomic: Add atomic bool support via i8 representation
  rust: sync: atomic: Add atomic bool tests

 rust/kernel/sync/atomic/internal.rs  |  1 +
 rust/kernel/sync/atomic/predefine.rs | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)


base-commit: dafb6d4cabd044ccd7e49cea29363e8526edc071
-- 
2.43.0


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

end of thread, other threads:[~2026-01-03  9:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-01  3:49 [PATCH v2 0/2] Add atomic bool support FUJITA Tomonori
2026-01-01  3:49 ` [PATCH v2 1/2] rust: sync: atomic: Add atomic bool support via i8 representation FUJITA Tomonori
2026-01-03  7:51   ` Boqun Feng
2026-01-03  9:38     ` FUJITA Tomonori
2026-01-01  3:49 ` [PATCH v2 2/2] rust: sync: atomic: Add atomic bool tests FUJITA Tomonori
2026-01-02 11:20 ` [PATCH v2 0/2] Add atomic bool support Gary Guo
2026-01-03  7:52   ` Boqun Feng

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