| /linux/rust/kernel/ |
| H A D | init.rs | 15 //! [`pin-init`]: https://rust.docs.kernel.org/pin_init/ 22 //! combination with [`pin_init!`]. 26 //! [`pin_init!`]: pin_init::pin_init 35 //! use pin_init::pin_init_from_closure; 56 //! let foo = pin_init!(Foo { 97 //! pin_init::pin_init_from_closure(move |slot: *mut Self| { 132 use pin_init::{init_from_closure, pin_init_from_closure, Init, PinInit}; 155 fn pin_init< in pin_init() 154 fn pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> error::Result<Self::PinnedSelf> pin_init() method [all...] |
| H A D | types.rs | 12 use pin_init::{PinInit, Wrapper, Zeroable}; 377 pin_init::pin_init_from_closure::<_, ::core::convert::Infallible>(move |slot| { 398 pin_init::pin_init_from_closure::<_, E>(move |slot| init_func(Self::cast_into(slot))) 423 fn pin_init<E>(init: impl PinInit<T, E>) -> impl PinInit<Self, E> { 429 unsafe { pin_init::raw_try_init(slot, init) } 414 fn pin_init<E>(slot: impl PinInit<T, E>) -> impl PinInit<Self, E> { pin_init() method
|
| H A D | prelude.rs | 52 pub use pin_init::{ 55 pin_init,
|
| H A D | xarray.rs | 20 use pin_init::{pin_data, pin_init, pinned_drop, PinInit}; 38 /// let xa = KBox::pin_init(XArray::new(AllocKind::Alloc1), GFP_KERNEL)?; 100 pin_init!(Self { in new()
|
| H A D | lib.rs | |
| H A D | sync.rs | 10 use pin_init; 110 pin_init!(Self { in new_dynamic()
|
| H A D | revocable.rs | 8 use pin_init::Wrapper; 47 /// let v = KBox::pin_init(Revocable::new(Example { a: 10, b: 20 }), GFP_KERNEL).unwrap(); 70 /// let v = KBox::pin_init(Revocable::new(Example { a: 10, b: 20 }), GFP_KERNEL).unwrap(); 97 data <- Opaque::pin_init(data),
|
| H A D | devres.rs | 209 let inner = Arc::pin_init::<Error>( in new() 439 let data = unsafe { pin_init::cast_pin_init(data) }; in new() 554 let data = KBox::pin_init(data, flags)?; in register()
|
| H A D | maple_tree.rs | 83 pin_init!(MapleTree { in new() 393 let tree = pin_init!(MapleTree { in new() 402 pin_init!(MapleTreeAlloc { tree <- tree }) in new()
|
| /linux/rust/pin-init/internal/src/ |
| H A D | zeroable.rs | 23 param.bounds.insert(0, parse_quote!(::pin_init::Zeroable)); in parse_zeroable_derive_input() 30 unsafe impl #impl_gen ::pin_init::Zeroable for #name #ty_gen in parse_zeroable_derive_input() 34 fn assert_zeroable<T: ?::core::marker::Sized + ::pin_init::Zeroable>() {} in parse_zeroable_derive_input() 60 param.bounds.insert(0, parse_quote!(::pin_init::Zeroable)); in parse_zeroable_derive_input() 68 .push(parse_quote!(#ty: for<'__dummy> ::pin_init::Zeroable)); in parse_zeroable_derive_input() 74 unsafe impl #impl_gen ::pin_init::Zeroable for #name #ty_gen in parse_zeroable_derive_input()
|
| H A D | init.rs | 128 where T: ::pin_init::Zeroable 152 use ::pin_init::__internal::#has_data_trait; 165 Ok(unsafe { ::pin_init::__internal::InitOk::new() }) 172 unsafe { ::pin_init::#init_from_closure::<_, #error>(init) } 265 ::pin_init::__internal::Slot::<::pin_init::__internal::Unpinned, _>::new(
|
| H A D | pinned_drop.rs | 27 .zip(["PinnedDrop", "pin_init", ""]) in pinned_drop() 36 *path = parse_quote!(::pin_init::PinnedDrop); in pinned_drop() 56 .push(parse_quote!(_: ::pin_init::__internal::OnlyCallFromDrop));
|
| /linux/rust/pin-init/ |
| H A D | README.md | 69 - directly creating an in-place constructor using the [`pin_init!`] macro, 84 ### Using the [`pin_init!`] macro 89 [`pin_init!`]. The syntax is almost the same as normal `struct` initializers. The difference is 93 use pin_init::{pin_data, pin_init, InPlaceInit}; 102 let foo = pin_init!(Foo { 112 let foo: Result<Pin<Box<Foo>>, AllocError> = Box::pin_init(foo); 115 For more information see the [`pin_init!`] macro. 123 let mtx: Result<Pin<Arc<CMutex<usize>>>, _> = Arc::pin_init(CMutex::new(42)); 138 pin_init!(Sel [all...] |
| /linux/rust/pin-init/examples/ |
| H A D | mutex.rs | 21 use pin_init::*; 78 pin_init!(CMutex { in new() 82 data <- UnsafeCell::pin_init(val), in new() 169 pin_init!(Self { 176 pin_init!(Self { in insert_new() 188 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in insert_new()
|
| H A D | linked_list.rs | 13 use pin_init::*; 33 pin_init!(&this in Self { 43 pin_init!(&this in Self { 52 pin_init!(&this in Self { 149 let a = Box::pin_init(ListHead::new())?; 153 let e = Box::pin_init(ListHead::insert_next(&b))?; in main()
|
| H A D | static_init.rs | 14 use pin_init::*; 62 Some(f) => unsafe { pin_init::raw_init(ptr, f) }, in deref() 77 unsafe { pin_init::raw_init(slot, init) }; in __pinned_init() 87 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
|
| H A D | pthread_mutex.rs | 18 use pin_init::*; 100 pin_init!(Self { in new() 147 use pin_init::*; in main()
|
| H A D | big_struct_in_place.rs | 3 use pin_init::*;
|
| /linux/rust/ |
| H A D | Makefile | 25 obj-$(CONFIG_RUST) += bindings.o pin_init.o kernel.o 157 pin_init-cfgs := \ 160 pin_init-flags := \ 163 $(call cfgs-to-flags,$(pin_init-cfgs)) 197 rustdoc-kernel rustdoc-pin_init rustdoc-zerocopy rustdoc-zerocopy_derive 273 rustdoc-pin_init: private rustdoc_host = yes 274 rustdoc-pin_init: private rustc_target_flags = $(pin_init-flags) \
|
| /linux/samples/rust/ |
| H A D | rust_debugfs_scoped.rs | 78 let blob = KBox::pin_init( in create_file_write() 79 new_mutex!(pin_init::init_array_from_fn(|_| 0x42)), in create_file_write() 83 let scope = KBox::pin_init( in create_file_write() 117 pin_init! { 144 _data: KBox::pin_init(init_control(&base_dir, dyn_dirs), GFP_KERNEL)?,
|
| /linux/rust/kernel/sync/ |
| H A D | lock.rs | 14 use pin_init::{pin_data, pin_init, PinInit, Wrapper}; 136 pin_init!(Self { in new() 137 data <- UnsafeCell::pin_init(t), in new() 220 /// # use pin_init::stack_pin_init;
|
| H A D | condvar.rs | 19 use pin_init::{pin_data, pin_init, PinInit}; 104 pin_init!(Self { in new()
|
| H A D | completion.rs | 36 /// let this = Arc::pin_init(pin_init!(MyTask { 81 pin_init!(Self { in new()
|
| /linux/rust/pin-init/src/ |
| H A D | lib.rs | 287 extern crate self as pin_init; 763 pub use pin_init_internal::pin_init; 1771 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E>; in pin_init() method 1776 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method 1784 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method 1793 fn pin_init<E>(init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method
|
| /linux/rust/uapi/ |
| H A D | lib.rs | 40 use pin_init::MaybeZeroable;
|