linux/rust/kernel/sync/lock
Alice Ryhl ecdfcc7f29 rust: add pr_*_ratelimited! macros for printing
Printing can be very expensive if it occurs often, so printing that can
be triggered by userspace should be rate limited. For this purpose, add
a Rust wrapper around `struct ratelimit_state` and use it in the new
macros.

The new files will fall under the catch-all RUST maintainers entry.

Tested-by: Alvin Sun <alvin.sun@linux.dev>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Link: https://github.com/Rust-for-Linux/linux/issues/122
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20261007-pr-ratelimited-v6-3-f14accd4ea3b@google.com
[ Removed unused link reference definitions. On the `static`, allowed
  the `non_upper_case_globals` lint so that `kernel` users (and users
  providing their own name) do not warn. Reworded title for typo.
    - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-10-12 07:03:26 +02:00
..
global.rs rust: sync: Add SpinLockIrq 2026-08-10 12:53:10 +02:00
mutex.rs rust: sync: Inline various lock related methods 2026-01-10 10:53:46 +08:00
spinlock.rs rust: add pr_*_ratelimited! macros for printing 2026-10-12 07:03:26 +02:00