Home
last modified time | relevance | path

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

/linux/drivers/android/binder/
H A Dcontext.rs11 sync::{Arc, Mutex},
25 contexts: KVVec<Arc<Context>>,
28 pub(crate) fn get_all_contexts() -> Result<KVVec<Arc<Context>>> { in get_all_contexts()
42 all_procs: KVVec<Arc<Process>>,
54 pub(crate) fn new(name: &CStr) -> Result<Arc<Self>> { in new()
56 let ctx = Arc::pin_init( in new()
76 pub(crate) fn deregister(self: &Arc<Self>) { in deregister()
78 CONTEXTS.lock().contexts.retain(|c| !Arc::ptr_eq(c, self)); in deregister()
81 pub(crate) fn register_process(self: &Arc<Self>, proc: Arc<Process>) -> Result { in register_process()
82 if !Arc::ptr_eq(self, &proc.ctx) { in register_process()
[all …]
H A Dtransaction.rs10 sync::{Arc, SpinLock},
70 pub(crate) from: Arc<Thread>,
71 pub(crate) to: Arc<Process>,
93 from: &Arc<Thread>, in new()
150 from: &Arc<Thread>, in new_reply()
151 to: Arc<Process>, in new_reply()
210 (Some(from_parent), Some(next)) => Arc::ptr_eq(from_parent, next), in is_stacked_on()
223 fn find_target_thread(&self) -> Option<Arc<Thread>> { in find_target_thread()
226 if Arc::ptr_eq(&transaction.from.process, &self.to) { in find_target_thread()
355 (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 Dprocess.rs33 Arc, ArcBorrow, CondVar, CondVarTimeoutResult, Mutex, SpinLock, UniqueArc,
108 threads: RBTree<i32, Arc<Thread>>,
352 pub(crate) process: Arc<Process>,
361 fn new(node_ref: NodeRef, handle: u32, process: Arc<Process>) -> impl PinInit<Self> { in new()
425 arc_offset: Arc::<Process>::DATA_OFFSET,
436 pub(crate) ctx: Arc<Context>,
485 type Pointer = Arc<Process>;
487 fn run(me: Arc<Self>) { in run()
505 fn new(ctx: Arc<Context>, cred: ARef<Credential>) -> Result<Arc<Self>> { in new()
507 let process = Arc::pin_init::<Error>( in new()
[all …]
H A Drust_binder_main.rs25 sync::Arc,
192 type DArc<T> = kernel::sync::Arc<DTRWrap<T>>;
343 Ok(ctx) => Arc::into_foreign(ctx), in rust_binder_new_context()
355 let ctx = unsafe { Arc::<Context>::from_foreign(device) }; in rust_binder_remove_context()
375 let ctx = unsafe { Arc::<Context>::borrow((*device).ctx) }; in rust_binder_open()
403 let process = unsafe { Arc::<Process>::from_foreign((*file).private_data) }; in rust_binder_release()
418 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_ioctl()
433 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_mmap()
450 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_poll()
467 let f = unsafe { Arc::<Process>::borrow((*file).private_data) }; in rust_binder_flush()
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()
519 fn get_work_local(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work_local()
560 fn get_work(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work()
[all …]
H A Dallocation.rs12 sync::{aref::ARef, Arc},
56 pub(crate) process: Arc<Process>,
65 process: Arc<Process>, in new()
369 if Arc::ptr_eq(&node_ref.node.owner, &self.alloc.process) { in transfer_binder_object()
/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
132 /// A wrapper around [`Arc`] that's guaranteed unique for the given id.
143 /// creation of new `ListArc` references from an [`Arc`] reference. Whatever strategy is used, the
153 /// While this `ListArc` is unique for the given id, there still might exist normal `Arc`
168 arc: Arc<T>,
182 // what we do for `Arc`.
223 let arc = Arc::from(unique); in from()
262 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/rust/pin-init/examples/
H A Dstatic_init.rs19 sync::Arc,
91 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
H A Dpthread_mutex.rs152 sync::Arc, in main()
156 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); in main()
H A Dmutex.rs18 sync::Arc,
197 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
145 /// use kernel::sync::{Arc, Completion};
168 /// ) -> Result<Arc<Registration<Data>>> {
171 /// let registration = Arc::pin_init(registration, GFP_KERNEL)?;
308 impl<T: ?Sized + ThreadedHandler + Send> ThreadedHandler for Arc<T> { in handle_threaded()
348 /// use kernel::sync::{Arc, Mutex};
380 /// ) -> Result<Arc<ThreadedRegistration<Data>>> {
384 /// let registration = Arc::pin_init(registration, GFP_KERNEL)?;
311 impl<T: ?Sized + ThreadedHandler + Send> ThreadedHandler for Arc<T> { global() 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));
246 [`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/
H A DCREDITS2323 D: Arc monochrome LCD framebuffer driver, x86 reboot fixups