Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: FUJITA Tomonori <fujita.tomonori@gmail.com>
To: boqun.feng@gmail.com, ojeda@kernel.org
Cc: a.hindborg@kernel.org, aliceryhl@google.com,
	bjorn3_gh@protonmail.com, dakr@kernel.org, gary@garyguo.net,
	lossin@kernel.org, tmgross@umich.edu, acourbot@nvidia.com,
	rust-for-linux@vger.kernel.org, linux-arch@vger.kernel.org
Subject: [PATCH v2 0/2] Add atomic bool support
Date: Thu,  1 Jan 2026 12:49:20 +0900	[thread overview]
Message-ID: <20260101034922.2020334-1-fujita.tomonori@gmail.com> (raw)

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


             reply	other threads:[~2026-01-01  5:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-01  3:49 FUJITA Tomonori [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260101034922.2020334-1-fujita.tomonori@gmail.com \
    --to=fujita.tomonori@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox