Files
linux-stable-mirror/rust/kernel
FUJITA Tomonori 06bd0e52bf rust: sync: atomic: Add atomic bool support via i8 representation
Add `bool` support, `Atomic<bool>` by using `i8` as its underlying
representation.

Rust specifies that `bool` has size 1 and alignment 1 [1], so it
matches `i8` on layout; keep `static_assert!()` checks to enforce this
assumption at build time.

[boqun: Remove the unnecessary impl AtomicImpl for bool]

Link: https://doc.rust-lang.org/reference/types/boolean.html [1]
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20260101034922.2020334-2-fujita.tomonori@gmail.com
2026-01-09 19:01:41 +08:00
..
2025-10-20 04:04:23 +02:00
2025-11-05 00:05:38 +01:00
2025-11-13 20:17:24 +11:00
2025-11-29 10:41:09 -08:00
2025-11-04 13:25:29 +01:00
2025-10-22 07:15:19 +02:00
2025-11-24 09:14:47 +13:00
2025-11-13 20:17:24 +11:00
2025-11-13 10:21:01 +01:00
2025-11-16 21:56:57 +01:00