diff options
author | Benno Lossin <[email protected]> | 2023-04-08 12:25:51 +0000 |
---|---|---|
committer | Miguel Ojeda <[email protected]> | 2023-04-12 18:41:05 +0200 |
commit | fc6c6baa1f40ded13e539d0c1a17bcefc00abad9 (patch) | |
tree | 0986654da09cbb36396558126c746c2da0b2eda3 /scripts/gdb/linux/proc.py | |
parent | 90e53c5e70a69159ec255fec361f7dcf9cf36eae (diff) |
rust: init: add initialization macros
Add the following initializer macros:
- `#[pin_data]` to annotate structurally pinned fields of structs,
needed for `pin_init!` and `try_pin_init!` to select the correct
initializer of fields.
- `pin_init!` create a pin-initializer for a struct with the
`Infallible` error type.
- `try_pin_init!` create a pin-initializer for a struct with a custom
error type (`kernel::error::Error` is the default).
- `init!` create an in-place-initializer for a struct with the
`Infallible` error type.
- `try_init!` create an in-place-initializer for a struct with a custom
error type (`kernel::error::Error` is the default).
Also add their needed internal helper traits and structs.
Co-developed-by: Gary Guo <[email protected]>
Signed-off-by: Gary Guo <[email protected]>
Signed-off-by: Benno Lossin <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed three typos. ]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions