diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2025-03-08 02:26:58 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-08 02:55:04 +0300 |
commit | c2849afafd08a1c3ad881129de48ebe1642f7675 (patch) | |
tree | d933bcb2020070b9c3ac465b5325efde14436d89 /rust/helpers/helpers.c | |
parent | 8f65291dae0e75941cf76e427088e5612c4d692e (diff) | |
download | linux-c2849afafd08a1c3ad881129de48ebe1642f7675.tar.xz |
rust: sync: lock: Add an example for Guard:: Lock_ref()
To provide examples on usage of `Guard::lock_ref()` along with the unit
test, an "assert a lock is held by a guard" example is added.
(Also apply feedback from Benno.)
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250223072114.3715-1-boqun.feng@gmail.com
Link: https://lore.kernel.org/r/20250307232717.1759087-9-boqun.feng@gmail.com
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions