mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
2e704f1883
`UnsafeCell<T>` and `T` have the same layout so if `T` is `Zeroable` then so should `UnsafeCell<T>` be. This allows using the derive macro for `Zeroable` on types that contain an `UnsafeCell<T>`. Since `Opaque<T>` contains a `MaybeUninit<T>`, all bytes zero is a valid bit pattern for that type. Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Signed-off-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/20230814084602.25699-11-benno.lossin@proton.me Signed-off-by: Miguel Ojeda <ojeda@kernel.org> |
||
---|---|---|
.. | ||
alloc | ||
bindings | ||
kernel | ||
macros | ||
uapi | ||
.gitignore | ||
bindgen_parameters | ||
build_error.rs | ||
compiler_builtins.rs | ||
exports.c | ||
helpers.c | ||
Makefile |