diff options
| author | Alice Ryhl <aliceryhl@google.com> | 2026-10-07 14:30:02 +0000 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-10-12 07:03:26 +0200 |
| commit | 107a25d62c40ef47b2284ee37fdefc1d3f5d013b (patch) | |
| tree | f05175cf2bb68cee1c972683cc0774ebfe6a01ff /scripts/Makefile.thinlto | |
| parent | 3a4e0ee57c5563aa997ea6d6b887a915e035e8e0 (diff) | |
| download | linux-107a25d62c40ef47b2284ee37fdefc1d3f5d013b.tar.gz linux-107a25d62c40ef47b2284ee37fdefc1d3f5d013b.zip | |
rust: sync: add const constructor for raw_spinlock_t
The abstractions for pr_*_ratelimited! need to construct a global
`struct ratelimit_state`, which contains a `raw_spinlock_t` field. Thus,
add a const constructor for the `raw_spinlock_t` type.
The SPINLOCK_OWNER_INIT constant isn't mirrored via a const helper
because bindgen generates a 'static mut' instead of a constant from the
pointer constant.,
The __ARCH_SPIN_LOCK_UNLOCKED constant cannot be translated by bindgen
because it's a define for a struct without type annotations, so it's
explicitly declared in Rust.
Reviewed-by: Boqun Feng <boqun@kernel.org>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20261007-pr-ratelimited-v6-2-f14accd4ea3b@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
