]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: sync: atomic: Prepare AtomicOps macros for i8/i16 support
authorFUJITA Tomonori <fujita.tomonori@gmail.com>
Sun, 28 Dec 2025 12:05:44 +0000 (21:05 +0900)
committerBoqun Feng <boqun.feng@gmail.com>
Fri, 9 Jan 2026 11:01:41 +0000 (19:01 +0800)
commit2bb8c41e61b29ccdf7b6d716c3a8fe8488aa202a
treeb56ecc8f53d3c6028a5c531c0438e1e3a59cd919
parent8de731a6c75547602601a5d219b5cf259ce2b38b
rust: sync: atomic: Prepare AtomicOps macros for i8/i16 support

Rework the internal AtomicOps macro plumbing to generate per-type
implementations from a mapping list.

Capture the trait definition once and reuse it for both declaration
and per-type impl expansion to reduce duplication and keep future
extensions simple.

This is a preparatory refactor for enabling i8/i16 atomics cleanly.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20251228120546.1602275-2-fujita.tomonori@gmail.com
rust/kernel/sync/atomic/internal.rs