Home
last modified time | relevance | path

Searched refs:Arc (Results 1 – 23 of 23) sorted by relevance

/linux/rust/kernel/list/
H A Darc.rs9 use crate::sync::{Arc, ArcBorrow, UniqueArc};
167 arc: Arc<T>,
222 let arc = Arc::from(unique); in from()
261 let arc1 = Arc::from(unique); in pair_from_pin_unique()
262 let arc2 = Arc::clone(&arc1); in pair_from_pin_unique()
277 pub fn try_from_arc(arc: Arc<T>) -> Result<Self, Arc<T>> in try_from_arc()
300 Some(unsafe { Self::transmute_from_arc(Arc::from(arc)) }) in try_from_arc_borrow()
310 pub fn try_from_arc_or_drop(arc: Arc<T>) -> Option<Self> in try_from_arc_or_drop()
316 Err(arc) => Arc::into_unique_or_drop(arc).map(Self::from), in try_from_arc_or_drop()
327 unsafe fn transmute_from_arc(arc: Arc<T>) -> Self { in transmute_from_arc()
[all …]
/linux/samples/rust/
H A Drust_print_main.rs22 let a = Arc::new(1, GFP_KERNEL)?; in arc_print()
31 let a: Arc<&str> = b.into(); in arc_print()
44 fn arc_dyn_print(arc: &Arc<dyn Display>) { in arc_print()
48 let a_i32_display: Arc<dyn Display> = Arc::new(42i32, GFP_KERNEL)?; in arc_print()
49 let a_str_display: Arc<dyn Display> = a.clone(); in arc_print()
/linux/rust/pin-init/src/
H A Dalloc.rs4 use alloc::{boxed::Box, sync::Arc};
9 use std::sync::Arc;
98 impl<T> InPlaceInit<T> for Arc<T> { implementation
104 let mut this = try_new_uninit!(Arc); in try_pin_init()
105 let Some(slot) = Arc::get_mut(&mut this) else { in try_pin_init()
122 let mut this = try_new_uninit!(Arc); in try_init()
123 let Some(slot) = Arc::get_mut(&mut this) else { in try_init()
/linux/drivers/android/binder/
H A Dtransaction.rs10 sync::{Arc, SpinLock},
32 pub(crate) from: Arc<Thread>,
33 pub(crate) to: Arc<Process>,
56 from: &Arc<Thread>, in new()
116 from: &Arc<Thread>, in new_reply()
117 to: Arc<Process>, in new_reply()
179 (Some(from_parent), Some(next)) => Arc::ptr_eq(from_parent, next), in is_stacked_on()
192 fn find_target_thread(&self) -> Option<Arc<Thread>> { in find_target_thread()
195 if Arc::ptr_eq(&transaction.from.process, &self.to) { in find_target_thread()
320 (Some(tn1), Some(tn2)) => Arc::ptr_eq(tn1, tn2), in can_replace()
H A Dfreeze.rs12 sync::{Arc, UniqueArc},
54 Arc::ptr_eq(&self.node, node) && self.is_clearing in allow_duplicate()
157 pub(crate) fn on_process_exit(&self, proc: &Arc<Process>) { in on_process_exit()
166 self: &Arc<Self>, in request_freeze_notif()
235 pub(crate) fn freeze_notif_done(self: &Arc<Self>, reader: &mut UserSliceReader) -> Result<()> { in freeze_notif_done()
271 pub(crate) fn clear_freeze_notif(self: &Arc<Self>, reader: &mut UserSliceReader) -> Result<()> { in clear_freeze_notif()
322 fn find_freeze_recipients(&self) -> Result<KVVec<(DArc<Node>, Arc<Process>)>, AllocError> { in find_freeze_recipients()
389 batch: KVVec<(Arc<Process>, DLArc<FreezeMessage>)>,
H A Drust_binder_main.rs22 sync::Arc,
183 type DArc<T> = kernel::sync::Arc<DTRWrap<T>>;
336 Ok(ctx) => Arc::into_foreign(ctx), in rust_binder_new_context()
348 let ctx = unsafe { Arc::<Context>::from_foreign(device) }; in rust_binder_remove_context()
368 let ctx = unsafe { Arc::<Context>::borrow((*device).ctx) }; in rust_binder_open()
396 let process = unsafe { Arc::<Process>::from_foreign((*file).private_data) }; in rust_binder_release()
411 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_ioctl()
426 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_mmap()
443 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_poll()
460 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_flush()
H A Dthread.rs19 sync::{Arc, SpinLock},
357 if !Arc::ptr_eq(transaction, &old) { in pop_transaction_replied()
412 pub(crate) process: Arc<Process>,
439 pub(crate) fn new(id: i32, process: Arc<Process>) -> Result<Arc<Self>> { in new()
442 Arc::pin_init( in new()
457 pub(crate) fn debug_print(self: &Arc<Self>, m: &SeqFile, print_all: bool) -> Result<()> { in debug_print()
472 if Arc::ptr_eq(&t.from, self) { in debug_print()
475 } else if Arc::ptr_eq(&t.to, &self.process) { in debug_print()
508 fn get_work_local(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work_local()
546 fn get_work(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work()
[all …]
H A Dprocess.rs32 Arc, ArcBorrow, CondVar, CondVarTimeoutResult, Mutex, SpinLock, UniqueArc,
107 threads: RBTree<i32, Arc<Thread>>,
351 pub(crate) process: Arc<Process>,
360 fn new(node_ref: NodeRef, handle: u32, process: Arc<Process>) -> impl PinInit<Self> { in new()
428 pub(crate) ctx: Arc<Context>,
477 type Pointer = Arc<Process>;
479 fn run(me: Arc<Self>) { in run()
497 fn new(ctx: Arc<Context>, cred: ARef<Credential>) -> Result<Arc<Self>> { in new()
663 thread: &'a Arc<Thread>, in get_work_or_register()
675 fn get_current_thread(self: ArcBorrow<'_, Self>) -> Result<Arc<Thread>> { in get_current_thread()
[all …]
H A Dnode.rs11 sync::{Arc, LockedBy, SpinLock},
170 freeze_list: KVVec<Arc<Process>>,
187 pub(crate) owner: Arc<Process>,
211 owner: Arc<Process>, in new()
651 process: &Arc<Process>, in add_freeze_listener()
654 let mut vec_alloc = KVVec::<Arc<Process>>::new(); in add_freeze_listener()
677 pub(crate) fn remove_freeze_listener(&self, p: &Arc<Process>) { in remove_freeze_listener()
682 inner.freeze_list.retain(|proc| !Arc::ptr_eq(proc, p)); in remove_freeze_listener()
694 pub(crate) fn freeze_list<'a>(&'a self, guard: &'a ProcessInner) -> &'a [Arc<Process>] { in freeze_list()
778 Arc::ptr_eq(&self.node, &other.node), in absorb()
[all …]
/linux/rust/kernel/debugfs/
H A Dentry.rs7 use crate::sync::Arc;
18 _parent: Option<Arc<Entry<'static>>>,
31 pub(crate) fn dynamic_dir(name: &CStr, parent: Option<Arc<Self>>) -> Self { in dynamic_dir()
54 parent: Arc<Self>, in dynamic_file()
H A Dtraits.rs11 use crate::sync::Arc;
113 impl<T> BinaryWriter for Arc<T> implementation
311 impl<T: ?Sized + BinaryReader> BinaryReader for Arc<T> { implementation
/linux/rust/pin-init/examples/
H A Dstatic_init.rs18 sync::Arc,
90 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
H A Dpthread_mutex.rs151 sync::Arc, in main()
155 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); in main()
H A Dmutex.rs17 sync::Arc,
196 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
/linux/rust/kernel/
H A Dfmt.rs90 {<T: ?Sized>} crate::sync::Arc<T> {where crate::sync::Arc<T>: core::fmt::Display},
H A Dconfigfs.rs118 use crate::sync::Arc;
362 let child_group = <Arc<Group<Child>> as InPlaceInit<Group<Child>>>::try_pin_init( in make_group()
408 let arc: Arc<Group<Child>> = unsafe { Arc::from_raw(r_child_group_ptr.cast_mut()) }; in drop_item()
456 let pin_self: Arc<Group<Data>> = unsafe { Arc::from_raw(r_group_ptr.cast_mut()) }; in release()
H A Dsync.rs25 pub use arc::{Arc, ArcBorrow, UniqueArc};
H A Ddebugfs.rs15 use crate::sync::Arc;
49 pub struct Dir(#[cfg(CONFIG_DEBUG_FS)] Option<Arc<Entry<'static>>>);
65 Arc::new(Entry::dynamic_dir(name, parent_entry), GFP_KERNEL).ok(), in create()
/linux/drivers/gpu/nova-core/
H A Ddriver.rs18 sync::Arc, //
84 let bar = Arc::pin_init( in probe()
/linux/drivers/cpufreq/
H A Drcpufreq_dt.rs16 sync::Arc,
59 type PData = Arc<CPUFreqDTDevice>;
139 Ok(Arc::new( in init()
/linux/rust/pin-init/
H A DREADME.md52 will require the `std` feature, because stable compilers have neither `Box` nor `Arc` in no-std
65 - a memory location that can hold your `struct` (this can be the [stack], an [`Arc<T>`],
123 let mtx: Result<Pin<Arc<CMutex<usize>>>, _> = Arc::pin_init(CMutex::new(42));
247 [`Arc<T>`]: https://doc.rust-lang.org/stable/alloc/sync/struct.Arc.html
/linux/drivers/gpu/drm/tyr/
H A Ddriver.rs19 use kernel::sync::Arc;
119 let iomem = Arc::pin_init(request.iomap_sized::<SZ_2M>(), GFP_KERNEL)?; in probe()
/linux/arch/mips/include/asm/
H A Dsgiarcs.h58 Arc, Cpu, Fpu, enumerator