Home
last modified time | relevance | path

Searched refs:Pin (Results 1 – 25 of 36) sorted by relevance

12

/rust/kernel/time/hrtimer/
A Dtbox.rs59 impl<T, A> HrTimerPointer for Pin<Box<T, A>> implementation
64 T: for<'a> HrTimerCallback<Pointer<'a> = Pin<Box<T, A>>>,
79 unsafe { NonNull::new_unchecked(Box::into_raw(Pin::into_inner_unchecked(self))) }; in start()
95 impl<T, A> RawHrTimerCallback for Pin<Box<T, A>> implementation
99 T: for<'a> HrTimerCallback<Pointer<'a> = Pin<Box<T, A>>>,
102 type CallbackTarget<'a> = Pin<&'a mut T>;
120 let data_mut_ref = unsafe { Pin::new_unchecked(&mut *data_ptr) }; in run()
A Dpin.rs10 use core::pin::Pin;
18 pub(crate) inner: Pin<&'a T>,
51 unsafe impl<'a, T> UnsafeHrTimerPointer for Pin<&'a T> implementation
77 impl<'a, T> RawHrTimerCallback for Pin<&'a T> implementation
104 let receiver_pin = unsafe { Pin::new_unchecked(receiver_ref) }; in run()
A Dpin_mut.rs7 use core::{marker::PhantomData, pin::Pin, ptr::NonNull};
49 unsafe impl<'a, T> UnsafeHrTimerPointer for Pin<&'a mut T> implementation
81 impl<'a, T> RawHrTimerCallback for Pin<&'a mut T> implementation
108 let receiver_pin = unsafe { Pin::new_unchecked(receiver_ref) }; in run()
/rust/kernel/drm/
A Dfile.rs9 use core::pin::Pin;
17 fn open(device: &drm::Device<Self::Driver>) -> Result<Pin<KBox<Self>>>; in open()
50 pub fn inner(&self) -> Pin<&T> { in inner()
53 unsafe { Pin::new_unchecked(&*(self.driver_priv())) } in inner()
78 let driver_priv = KBox::into_raw(unsafe { Pin::into_inner_unchecked(inner) }); in open_callback()
/rust/kernel/alloc/
A Dkbox.rs15 use core::pin::Pin;
295 pub fn into_pin(this: Self) -> Pin<Self> { in into_pin()
339 impl<T, A> From<Box<T, A>> for Pin<Box<T, A>> implementation
351 unsafe { Pin::new_unchecked(b) } in from()
384 type PinnedSelf = Pin<Self>;
439 unsafe impl<T: 'static, A> ForeignOwnable for Pin<Box<T, A>> implementation
444 type Borrowed<'a> = Pin<&'a T>;
445 type BorrowedMut<'a> = Pin<&'a mut T>;
458 unsafe fn borrow<'a>(ptr: *mut c_void) -> Pin<&'a T> { in borrow()
466 unsafe { Pin::new_unchecked(r) } in borrow()
[all …]
/rust/pin-init/src/
A Dalloc.rs7 use core::{mem::MaybeUninit, pin::Pin};
30 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
38 fn pin_init(init: impl PinInit<T>) -> Result<Pin<Self>, AllocError> { in pin_init()
82 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
100 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
114 Ok(unsafe { Pin::new_unchecked(this.assume_init()) }) in try_pin_init()
148 fn write_pin_init<E>(mut self, init: impl PinInit<T, E>) -> Result<Pin<Self::Initialized>, E> { in write_pin_init()
A D__internal.rs171 pub fn init<E>(self: Pin<&mut Self>, init: impl PinInit<T, E>) -> Result<Pin<&mut T>, E> { in init()
173 let this = unsafe { Pin::into_inner_unchecked(self) }; in init()
186 Ok(unsafe { Pin::new_unchecked(this.value.assume_init_mut()) }) in init()
201 let mut slot: Pin<&mut StackInit<Foo>> = pin!(StackInit::uninit()); in stack_init_reuse()
202 let value: Result<Pin<&mut Foo>, core::convert::Infallible> = in stack_init_reuse()
209 let value: Result<Pin<&mut Foo>, core::convert::Infallible> = in stack_init_reuse()
A Dlib.rs289 pin::Pin,
1086 F: FnOnce(Pin<&mut T>) -> Result<(), E>, in pin_chain()
1102 F: FnOnce(Pin<&mut T>) -> Result<(), E>,
1110 let val = unsafe { Pin::new_unchecked(val) }; in __pinned_init()
1447 fn write_pin_init<E>(self, init: impl PinInit<T, E>) -> Result<Pin<Self::Initialized>, E>; in write_pin_init()
1485 fn drop(self: Pin<&mut Self>, only_call_from_drop: __internal::OnlyCallFromDrop); in drop()
/rust/kernel/list/
A Darc.rs12 use core::pin::Pin;
42 unsafe fn on_create_list_arc_from_unique(self: Pin<&mut Self>); in on_create_list_arc_from_unique()
103 ::core::pin::Pin::map_unchecked_mut(self, |me| &mut me.$field)
209 Self::from(Pin::from(unique)) in from()
213 impl<T, const ID: u64> From<Pin<UniqueArc<T>>> for ListArc<T, ID>
219 fn from(mut unique: Pin<UniqueArc<T>>) -> Self { in from()
241 Self::pair_from_pin_unique(Pin::from(unique)) in pair_from_unique()
249 mut unique: Pin<UniqueArc<T>>, in pair_from_pin_unique()
488 fn project_inner(self: Pin<&mut Self>) -> &mut AtomicBool { in project_inner()
491 unsafe { &mut Pin::into_inner_unchecked(self).inner } in project_inner()
[all …]
/rust/kernel/block/mq/
A Dtag_set.rs7 use core::pin::Pin;
66 let tag_set: &mut Opaque<_> = unsafe { Pin::get_unchecked_mut(tag_set) }; in new()
82 fn drop(self: Pin<&mut Self>) { in drop()
/rust/kernel/
A Dworkqueue.rs360 fn project(self: Pin<&mut Self>) -> &mut Option<T> { in project()
367 type Pointer = Pin<KBox<Self>>;
369 fn run(mut this: Pin<KBox<Self>>) { in run()
504 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> in new()
674 work_key: Pin<&'static LockClassKey>, in new()
676 timer_key: Pin<&'static LockClassKey>, in new()
885 unsafe impl<T, const ID: u64> WorkItemPointer<ID> for Pin<KBox<T>> implementation
898 let pinned = unsafe { Pin::new_unchecked(boxed) }; in run()
905 unsafe impl<T, const ID: u64> RawWorkItem<ID> for Pin<KBox<T>> implementation
918 let boxed = unsafe { Pin::into_inner_unchecked(self) }; in __enqueue()
[all …]
A Dsync.rs86 fn drop(self: Pin<&mut Self>) { in drop()
105 $crate::prelude::Pin::static_ref(&CLASS)
A Dprelude.rs15 pub use core::pin::Pin;
A Dplatform.rs93 let data = unsafe { pdev.as_ref().drvdata_obtain::<Pin<KBox<T>>>() }; in remove_callback()
193 -> Result<Pin<KBox<Self>>>; in probe()
205 fn unbind(dev: &Device<device::Core>, this: Pin<&Self>) { in unbind()
A Ddriver.rs10 use core::pin::Pin;
92 fn drop(self: Pin<&mut Self>) { in drop()
A Dxarray.rs13 use core::{iter, marker::PhantomData, pin::Pin, ptr::NonNull};
64 fn drop(self: Pin<&mut Self>) { in drop()
/rust/pin-init/examples/
A Dmutex.rs12 pin::Pin,
92 pub fn lock(&self) -> Pin<CMutexGuard<'_, T>> { in lock()
109 Pin::new_unchecked(CMutexGuard { in lock()
117 pub fn get_data_mut(self: Pin<&mut Self>) -> &mut T { in get_data_mut()
196 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
A Dpthread_mutex.rs17 pin::Pin,
36 fn drop(self: Pin<&mut Self>) { in drop()
147 use core::pin::Pin; in main()
155 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); in main()
A Dstatic_init.rs12 pin::Pin,
90 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
A Dlinked_list.rs11 pin::Pin,
85 fn drop(self: Pin<&mut Self>) { in drop()
/rust/kernel/sync/
A Dpoll.rs76 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new()
95 fn drop(self: Pin<&mut Self>) { in drop()
A Darc.rs34 pin::Pin,
347 pub fn into_unique_or_drop(self) -> Option<Pin<UniqueArc<T>>> { in into_unique_or_drop()
367 Some(Pin::from(UniqueArc { in into_unique_or_drop()
500 impl<T: ?Sized> From<Pin<UniqueArc<T>>> for Arc<T> {
501 fn from(item: Pin<UniqueArc<T>>) -> Self { in from()
503 unsafe { Pin::into_inner_unchecked(item).inner } in from()
723 type PinnedSelf = Pin<Self>;
754 fn write_pin_init<E>(mut self, init: impl PinInit<T, E>) -> Result<Pin<Self::Initialized>, E> { in write_pin_init()
829 ) -> core::result::Result<Pin<UniqueArc<T>>, E> { in pin_init_with()
840 impl<T: ?Sized> From<UniqueArc<T>> for Pin<UniqueArc<T>> { implementation
[all …]
A Dcondvar.rs18 use core::{marker::PhantomPinned, pin::Pin, ptr};
103 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new()
A Dlock.rs13 use core::{cell::UnsafeCell, marker::PhantomPinned, pin::Pin};
130 pub fn new(t: T, name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new()
/rust/kernel/sync/lock/
A Dglobal.rs16 pin::Pin,
30 fn get_lock_class() -> Pin<&'static LockClassKey>; in get_lock_class()
274 fn get_lock_class() -> Pin<&'static $crate::sync::LockClassKey> {

Completed in 793 milliseconds

12