linux/rust/kernel/sync
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
..
arc rust: provide proper code documentation titles 2024-10-07 21:39:57 +02:00
atomic rust: sync: Add generic memory barriers 2026-08-04 05:52:54 -07:00
lock rust: add pr_*_ratelimited! macros for printing 2026-10-12 07:03:26 +02:00
arc.rs rust: sync: improve Arc documentation links 2026-08-10 06:44:10 +02:00
aref.rs rust: types: implement ForeignOwnable for ARef<T> 2026-08-10 07:58:27 +02:00
atomic.rs rust: sync: atomic: Update documentation for fetch_add() 2026-03-08 11:06:51 +01:00
barrier.rs rust: sync: Add generic memory barriers 2026-08-04 05:52:54 -07:00
completion.rs rust: sync: completion: Mark inline complete_all and wait_for_completion 2026-06-09 10:28:06 +02:00
condvar.rs Rust changes for v6.19 2025-12-03 14:16:49 -08:00
lock.rs rust: sync: Inline various lock related methods 2026-01-10 10:53:46 +08:00
lockdep.rs rust: sync: add const constructor for raw_spinlock_t 2026-10-12 07:03:26 +02:00
locked_by.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
poll.rs Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
rcu.rs Locking updates for v7.3: 2026-08-18 13:07:17 -07:00
refcount.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
set_once.rs rust: sync: set_once: Implement Send and Sync 2026-01-09 19:01:40 +08:00
srcu.rs rust: sync: add SRCU abstraction 2026-07-15 15:34:26 -07:00