Home
last modified time | relevance | path

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

/linux/rust/kernel/list/
H A Darc.rs5 //! A wrapper around `Arc` for linked lists.
10 use crate::sync::{Arc, ArcBorrow, UniqueArc};
58 /// Attempts to convert an `Arc<Self>` into an `ListArc<Self>`. Returns `true` if the
131 /// A wrapper around [`Arc`] that's guaranteed unique for the given id.
142 /// creation of new `ListArc` references from an [`Arc`] reference. Whatever strategy is used, the
152 /// While this `ListArc` is unique for the given id, there still might exist normal `Arc`
167 arc: Arc<T>,
181 // what we do for `Arc`.
222 let arc = Arc::from(unique); in from()
261 let arc1 = Arc in pair_from_pin_unique()
[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()
38 // `Arc` can be used to delegate dynamic dispatch and the following is an example. in arc_print()
40 // behaviour, contract or protocol on both `i32` and `&str` into a single `Arc` of in arc_print()
41 // type `Arc<dyn Display>`. in arc_print()
44 fn arc_dyn_print(arc: &Arc<dyn Display>) { in arc_print()
45 pr_info!("Arc<dyn Display> says {arc}"); 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<dy in arc_print()
[all...]
/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/rust/kernel/debugfs/
H A Dentry.rs11 sync::Arc,
24 _parent: Option<Arc<Entry<'static>>>,
37 pub(crate) fn dynamic_dir(name: &CStr, parent: Option<Arc<Self>>) -> Self { in dynamic_dir()
60 parent: Arc<Self>, in dynamic_file()
H A Dtraits.rs18 Arc,
133 // Delegate for `Arc<T>`: Support a `Arc<T>` with no lock or an inner lock. in write_to_slice()
134 impl<T> BinaryWriter for Arc<T> in write_to_slice()
331 // Delegate for `Arc<T>`: Support an `Arc<T>` with an inner lock.
332 impl<T: ?Sized + BinaryReader> BinaryReader for Arc<T> {
113 impl<T> BinaryWriter for Arc<T> global() implementation
311 impl<T: ?Sized + BinaryReader> BinaryReader for Arc<T> { global() implementation
/linux/drivers/android/binder/
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 Dthread.rs20 sync::{aref::ARef, Arc, SpinLock},
365 if !Arc::ptr_eq(transaction, &old) { in pop_transaction_replied()
420 pub(crate) process: Arc<Process>,
447 pub(crate) fn new(id: i32, process: Arc<Process>) -> Result<Arc<Self>> { in new()
450 Arc::pin_init( in new()
465 pub(crate) fn debug_print(self: &Arc<Self>, m: &SeqFile, print_all: bool) -> Result<()> { in debug_print()
480 if Arc::ptr_eq(&t.from, self) { in debug_print()
483 } else if Arc::ptr_eq(&t.to, &self.process) { in debug_print()
516 fn get_work_local(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work_local()
554 fn get_work(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work()
[all …]
/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.rs117 use crate::sync::Arc;
361 let child_group = <Arc<Group<Child>> as InPlaceInit<Group<Child>>>::try_pin_init( in make_group()
407 let arc: Arc<Group<Child>> = unsafe { Arc::from_raw(r_child_group_ptr.cast_mut()) }; in drop_item()
455 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};
129 /// use kernel::sync::{static_lock_class, Arc, SpinLock};
131 /// fn new_locked_int() -> Result<Arc<SpinLock<u32>>> {
132 /// Arc::pin_init(SpinLock::new(
H A Ddebugfs.rs12 use crate::sync::Arc;
69 // The `None` option indicates that the `Arc` could not be allocated, so our children would not be in create()
73 pub struct Dir(#[cfg(CONFIG_DEBUG_FS)] Option<Arc<Entry<'static>>>);
87 // If Arc creation fails, the `Entry` will be dropped, so the directory will be in create_file()
89 Arc::new(Entry::dynamic_dir(name, parent_entry), GFP_KERNEL).ok(), in create_file()
/linux/rust/kernel/irq/
H A Drequest.rs17 use crate::sync::Arc;
42 impl<T: ?Sized + Handler + Send> Handler for Arc<T> { implementation
311 impl<T: ?Sized + ThreadedHandler + Send> ThreadedHandler for Arc<T> { implementation
/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/arch/mips/include/asm/
H A Dsgiarcs.h58 Arc, Cpu, Fpu, enumerator
/linux/drivers/video/fbdev/
H A DKconfig247 tristate "Arc Monochrome LCD board support"
251 This enables support for the Arc Monochrome LCD board. The board
/linux/
H A DCREDITS2316 D: Arc monochrome LCD framebuffer driver, x86 reboot fixups