diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-06-26 20:36:11 +0200 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-07-11 19:44:38 +0200 |
| commit | 6763c8876d2a74ebed1754c3ea1f7c13653409a9 (patch) | |
| tree | 85faa6d913b38bfa1ccb5f769fd440fdda535c7a /tools/perf/scripts/python | |
| parent | 491784c54cc10dcc018059a2f2594dd336fa480b (diff) | |
rust: auxiliary: sample: demonstrate ForLt with invariant Mutex type
Extend the auxiliary driver sample to demonstrate both access patterns:
- registration_data() with CovariantForLt!(Data<'_>) for the covariant
data type that holds a plain &'bound reference.
- registration_data_with() with ForLt!(MutexData<'_>) for an invariant
data type that wraps a Mutex<&'bound Device>. Since Mutex<T> is
invariant over T, MutexData cannot implement CovariantForLt and must
use the closure-based accessor.
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260626183630.2585057-5-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
