Home
last modified time | relevance | path

Searched refs:pin_init (Results 1 – 25 of 50) sorted by relevance

12

/linux/rust/kernel/
H A Dinit.rs132 use pin_init::{init_from_closure, pin_init_from_closure, Init, PinInit};
154 fn pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> error::Result<Self::PinnedSelf> in pin_init() method
225 ::pin_init::try_init!($(&$this in)? $t $(::<$($generics),*>)? {
232 ::pin_init::try_init!($(&$this in)? $t $(::<$($generics),*>)? {
285 ::pin_init::try_pin_init!($(&$this in)? $t $(::<$($generics),*>)? {
292 ::pin_init::try_pin_init!($(&$this in)? $t $(::<$($generics),*>)? {
H A Dtypes.rs12 use pin_init::{PinInit, Wrapper, Zeroable};
368 pin_init::pin_init_from_closure::<_, ::core::convert::Infallible>(move |slot| { in ffi_init()
389 pin_init::pin_init_from_closure::<_, E>(move |slot| init_func(Self::cast_into(slot))) in try_ffi_init()
414 fn pin_init<E>(slot: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method
H A Dprelude.rs30 pub use pin_init::{init, pin_data, pin_init, pinned_drop, InPlaceWrite, Init, PinInit, Zeroable};
H A Dsync.rs10 use pin_init;
78 pin_init!(Self { in new_dynamic()
H A Dxarray.rs14 use pin_init::{pin_data, pin_init, pinned_drop, PinInit};
94 pin_init!(Self { in new()
H A Ddevres.rs20 use pin_init::Wrapper;
154 inner <- Opaque::pin_init(try_pin_init!(Inner { in new()
376 let data = KBox::pin_init(data, flags)?; in register()
H A Dlib.rs183 fn init(module: &'static ThisModule) -> impl pin_init::PinInit<Self, error::Error>; in init()
187 fn init(module: &'static ThisModule) -> impl pin_init::PinInit<Self, error::Error> { in init()
197 unsafe { pin_init::pin_init_from_closure(initer) } in init()
H A Drevocable.rs8 use pin_init::Wrapper;
88 data <- Opaque::pin_init(data), in new()
H A Ddriver.rs96 use pin_init::{pin_data, pinned_drop, PinInit};
202 ) -> impl ::pin_init::PinInit<Self, $crate::error::Error> {
H A Dmaple_tree.rs83 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 Dzeroable.rs40 new_impl_generics.extend(quote! { : ::pin_init::Zeroable }); in parse_zeroable_derive_input()
54 new_impl_generics.extend(quote! { ::pin_init::Zeroable + }); in parse_zeroable_derive_input()
72 new_impl_generics.extend(quote! { : ::pin_init::Zeroable }); in parse_zeroable_derive_input()
80 ::pin_init::__derive_zeroable!( in derive()
93 ::pin_init::__maybe_derive_zeroable!( in maybe_derive()
H A Dpinned_drop.rs40 toks.splice(idx..idx, quote!(::pin_init::)); in pinned_drop()
44 quote!(::pin_init::__pinned_drop! { in pinned_drop()
/linux/rust/pin-init/
H A DREADME.md69 - 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));
140 buffer: Box::init(pin_init::init_zeroed())?,
161 use pin_init::{pin_data, pinned_drop, PinInit, PinnedDrop, pin_init_from_closure};
[all …]
/linux/rust/pin-init/examples/
H A Dmutex.rs22 use pin_init::*;
79 pin_init!(CMutex { in new()
177 pin_init!(Self { in insert_new()
184 pin_init!(Self { in insert_new()
196 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
H A Dlinked_list.rs15 use pin_init::*;
151 let a = Box::pin_init(ListHead::new())?; in main()
155 let e = Box::pin_init(ListHead::insert_next(&b))?; in main()
H A Dstatic_init.rs15 use pin_init::*;
90 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
H A Dpthread_mutex.rs19 use pin_init::*;
148 use pin_init::*; in main()
/linux/samples/rust/
H A Drust_debugfs_scoped.rs70 let blob = KBox::pin_init(new_mutex!([0x42; SZ_4K]), GFP_KERNEL)?; in create_file_write()
72 let scope = KBox::pin_init( in create_file_write()
106 pin_init! { in init()
137 _data: KBox::pin_init(init_control(&base_dir, dyn_dirs), GFP_KERNEL)?, in init()
/linux/rust/kernel/sync/
H A Dlock.rs14 use pin_init::{pin_data, pin_init, PinInit, Wrapper};
136 pin_init!(Self { in new()
137 data <- UnsafeCell::pin_init(t), in new()
H A Dcondvar.rs19 use pin_init::{pin_data, pin_init, PinInit};
104 pin_init!(Self { in new()
H A Dcompletion.rs81 pin_init!(Self { in new()
/linux/drivers/gpu/nova-core/
H A Ddriver.rs73 pin_init::pin_init_scope(move || { in probe()
84 let bar = Arc::pin_init( in probe()
/linux/rust/
H A DMakefile15 obj-$(CONFIG_RUST) += bindings.o pin_init.o kernel.o
155 rustdoc-kernel rustdoc-pin_init
220 rustdoc-pin_init: private rustdoc_host = yes
221 rustdoc-pin_init: private rustc_target_flags = --extern pin_init_internal \
/linux/rust/pin-init/src/
H A Dlib.rs782 macro_rules! pin_init { macro
1797 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E>; in pin_init() method
1801 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method
1808 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method
1816 fn pin_init<E>(init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method
/linux/rust/kernel/pci/
H A Dirq.rs183 pin_init::pin_init_scope(move || { in request_irq()
198 pin_init::pin_init_scope(move || { in request_threaded_irq()

12