summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorBoqun Feng <boqun.feng@gmail.com>2025-03-08 02:26:58 +0300
committerIngo Molnar <mingo@kernel.org>2025-03-08 02:55:04 +0300
commitc2849afafd08a1c3ad881129de48ebe1642f7675 (patch)
treed933bcb2020070b9c3ac465b5325efde14436d89 /rust/helpers/helpers.c
parent8f65291dae0e75941cf76e427088e5612c4d692e (diff)
downloadlinux-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