Home
last modified time | relevance | path

Searched refs:pin_init (Results 1 – 25 of 48) 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};
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 Dtypes.rs12 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 Dprelude.rs52 pub use pin_init::{
55 pin_init,
H A Dxarray.rs20 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 Dlib.rs
H A Dsync.rs10 use pin_init;
110 pin_init!(Self { in new_dynamic()
H A Drevocable.rs8 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 Ddevres.rs209 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 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 Dinit.rs128 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 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/pin-init/examples/
H A Dmutex.rs21 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 Dlinked_list.rs13 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 Dstatic_init.rs14 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 Dpthread_mutex.rs18 use pin_init::*;
100 pin_init!(Self { in new()
147 use pin_init::*; in main()
H A Dbig_struct_in_place.rs3 use pin_init::*;
/linux/rust/
H A DMakefile25 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 Drust_debugfs_scoped.rs78 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 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.rs36 /// let this = Arc::pin_init(pin_init!(MyTask {
81 pin_init!(Self { in new()
/linux/rust/pin-init/src/
H A Dlib.rs287 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 Dlib.rs40 use pin_init::MaybeZeroable;

12