mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-23 14:43:46 +00:00
Define the ListLinks struct, which wraps the prev/next pointers that will be used to insert values into a List in a future patch. Also define the ListItem trait, which is implemented by structs that have a ListLinks field. The ListItem trait provides four different methods that are all essentially container_of or the reverse of container_of. Two of them are used before inserting/after removing an item from the list, and the two others are used when looking at a value without changing whether it is in a list. This distinction is introduced because it is needed for the patch that adds support for heterogeneous lists, which are implemented by adding a third pointer field with a fat pointer to the full struct. When inserting into the heterogeneous list, the pointer-to-self is updated to have the right vtable, and the container_of operation is implemented by just returning that pointer instead of using the real container_of operation. Reviewed-by: Benno Lossin <benno.lossin@proton.me> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240814-linked-list-v5-4-f5f5e8075da0@google.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org> |
||
|---|---|---|
| .. | ||
| alloc | ||
| block | ||
| init | ||
| list | ||
| net | ||
| sync | ||
| alloc.rs | ||
| block.rs | ||
| build_assert.rs | ||
| device.rs | ||
| error.rs | ||
| firmware.rs | ||
| init.rs | ||
| ioctl.rs | ||
| kunit.rs | ||
| lib.rs | ||
| list.rs | ||
| net.rs | ||
| page.rs | ||
| prelude.rs | ||
| print.rs | ||
| static_assert.rs | ||
| std_vendor.rs | ||
| str.rs | ||
| sync.rs | ||
| task.rs | ||
| time.rs | ||
| types.rs | ||
| uaccess.rs | ||
| workqueue.rs | ||