mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
fe95f58320
The `Task` struct has several safety comments that aren't so great. For example, the reason that it's okay to read the `pid` is that the field is immutable, so there is no data race, which is not what the safety comment says. Thus, improve the safety comments. Also add an `as_ptr` helper. This makes it easier to read the various accessors on Task, as `self.0` may be confusing syntax for new Rust users. Signed-off-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241015-task-safety-cmnts-v1-1-46ee92c82768@google.com Signed-off-by: Christian Brauner <brauner@kernel.org> |
||
---|---|---|
.. | ||
bindings | ||
helpers | ||
kernel | ||
macros | ||
uapi | ||
.gitignore | ||
bindgen_parameters | ||
build_error.rs | ||
compiler_builtins.rs | ||
exports.c | ||
Makefile |