Home
last modified time | relevance | path

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

12

/linux/rust/kernel/
H A Dinit.rs15 //! [`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};
154 fn pin_init< method
[all...]
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;
80 /// use pin_init::stack_pin_init; in new_dynamic()
82 /// let key = KBox::pin_init(LockClassKey::new_dynamic(), GFP_KERNEL)?; in new_dynamic()
101 pin_init!(Self {
132 /// Arc::pin_init(SpinLock::new(
H A Dxarray.rs14 use pin_init::{pin_data, pin_init, pinned_drop, PinInit};
94 pin_init!(Self { in new()
H A Ddevres.rs132 let data = Arc::pin_init(Revocable::new(data), GFP_KERNEL)?;
337 let data = KBox::pin_init(data, flags)?; in register_foreign()
H A Dlib.rs189 fn init(module: &'static ThisModule) -> impl pin_init::PinInit<Self, error::Error>; in init()
193 fn init(module: &'static ThisModule) -> impl pin_init::PinInit<Self, error::Error> { in init()
203 unsafe { pin_init::pin_init_from_closure(initer) }
H A Drevocable.rs8 use pin_init::Wrapper;
88 data <- Opaque::pin_init(data), in new()
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.rs23 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 Dpinned_drop.rs27 .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 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));
138 pin_init!(Sel
[all...]
/linux/rust/
H A DMakefile15 obj-$(CONFIG_RUST) += bindings.o pin_init.o kernel.o
129 pin_init-cfgs := \
132 pin_init-flags := \
135 $(call cfgs-to-flags,$(pin_init-cfgs))
172 rustdoc-kernel rustdoc-pin_init
237 rustdoc-pin_init: private rustdoc_host = yes
238 rustdoc-pin_init: private rustc_target_flags = $(pin_init-flags) \
/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.rs14 use pin_init::*;
34 pin_init!(&this in Self { in new()
44 pin_init!(&this in Self { in insert_next()
53 pin_init!(&this in Self { in insert_prev()
150 let a = Box::pin_init(ListHead::new())?; in main()
154 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::*;
101 pin_init!(Self { in new()
148 use pin_init::*; in main()
H A Dbig_struct_in_place.rs3 use pin_init::*;
/linux/samples/rust/
H A Drust_debugfs_scoped.rs78 let blob = KBox::pin_init(new_mutex!([0x42; SZ_4K]), GFP_KERNEL)?; in create_file_write()
80 let scope = KBox::pin_init( in create_file_write()
114 pin_init! {
141 _data: KBox::pin_init(init_control(&base_dir, dyn_dirs), GFP_KERNEL)?,
/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()
220 /// # use pin_init::stack_pin_init;
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/rust/pin-init/src/
H A Dlib.rs296 extern crate self as pin_init;
782 pub use pin_init_internal::pin_init;
1691 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E>; in pin_init() method
1695 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method
1702 fn pin_init<E>(value_init: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() method
1710 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()
/linux/drivers/gpu/nova-core/gsp/fw/
H A Dr570_144.rs28 use pin_init::MaybeZeroable;

12