summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2025-08-11 12:14:41 +0000
committerBoqun Feng <boqun.feng@gmail.com>2026-01-09 19:01:40 +0800
commit86f4a271dc1962e389ea512d07a77626dbd8c1d8 (patch)
treeea3f89209773f78fa9d069b2ff841d2a879ab464 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parenta45026cef17d1080c985adf28234d6c8475ad66f (diff)
rust: sync: Refactor static_lock_class!() macro
By introducing a new_static() constructor, the macro does not need to go through MaybeUninit::uninit().assume_init(), which is a pattern that is best avoided when possible. The safety comment not only requires that the value is leaked, but also that it is stored in the right portion of memory. This is so that the lockdep static_obj() check will succeed when using this constructor. One could argue that lockdep detects this scenario, so that safety requirement isn't needed. However, it simplifies matters to require that static_obj() will succeed and it's not a burdensome requirement on the caller. Suggested-by: Benno Lossin <lossin@kernel.org> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://patch.msgid.link/20250811-lock-class-key-cleanup-v3-1-b12967ee1ca2@google.com
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions