diff options
author | 2023-04-08 12:26:22 +0000 | |
---|---|---|
committer | 2023-04-12 18:41:05 +0200 | |
commit | 692e8935e23efab6c5d5fc4b003816b33c8082f7 (patch) | |
tree | 18fe62f03bfdc6475f4e0ab63eb952cc4d98aaa3 /scripts/gdb/linux/utils.py | |
parent | rust: prelude: add `pin-init` API items to prelude (diff) | |
download | linux-rng-692e8935e23efab6c5d5fc4b003816b33c8082f7.tar.xz linux-rng-692e8935e23efab6c5d5fc4b003816b33c8082f7.zip |
rust: types: add `Opaque::ffi_init`
This function allows to easily initialize `Opaque` with the pin-init
API. `Opaque::ffi_init` takes a closure and returns a pin-initializer.
This pin-initiailizer calls the given closure with a pointer to the
inner `T`.
Co-developed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20230408122429.1103522-14-y86-dev@protonmail.com
[ Fixed typo. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions