| /linux/drivers/android/binder/ |
| H A D | context.rs | 11 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 D | transaction.rs | 10 sync::{Arc, SpinLock}, 71 pub(crate) from: Arc<Thread>, 72 pub(crate) to: Arc<Process>, 94 from: &Arc<Thread>, in new() 150 from: &Arc<Thread>, in new_reply() 151 to: Arc<Process>, in new_reply() 209 (Some(from_parent), Some(next)) => Arc::ptr_eq(from_parent, next), in is_stacked_on() 222 fn find_target_thread(&self) -> Option<Arc<Thread>> { in find_target_thread() 225 if Arc::ptr_eq(&transaction.from.process, &self.to) { in find_target_thread() 363 (Some(tn1), Some(tn2)) => Arc::ptr_eq(tn1, tn2), in can_replace()
|
| H A D | freeze.rs | 12 sync::{Arc, UniqueArc}, 54 Arc::ptr_eq(&self.node, node) && self.is_clearing in allow_duplicate() 163 pub(crate) fn on_process_cleanup(&self, proc: &Process) -> KVVec<Arc<Process>> { in on_process_cleanup() 173 self: &Arc<Self>, in request_freeze_notif() 242 pub(crate) fn freeze_notif_done(self: &Arc<Self>, reader: &mut UserSliceReader) -> Result<()> { in freeze_notif_done() 278 pub(crate) fn clear_freeze_notif(self: &Arc<Self>, reader: &mut UserSliceReader) -> Result<()> { in clear_freeze_notif() 329 fn find_freeze_recipients(&self) -> Result<KVVec<(DArc<Node>, Arc<Process>)>, AllocError> { in find_freeze_recipients() 396 batch: KVVec<(Arc<Process>, DLArc<FreezeMessage>)>,
|
| H A D | process.rs | 33 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 D | thread.rs | 20 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() 526 fn get_work_local(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work_local() 567 fn get_work(self: &Arc<Self>, wait: bool) -> Result<Option<DLArc<dyn DeliverToRead>>> { in get_work() [all …]
|
| H A D | node.rs | 11 sync::{Arc, LockedBy, SpinLock}, 170 freeze_list: KVVec<Arc<Process>>, 184 arc_offset: Arc::<Node>::DATA_OFFSET + offset_of!(DTRWrap<Node>, wrapped), 195 pub(crate) owner: Arc<Process>, 219 owner: Arc<Process>, in new() 659 process: &Arc<Process>, in add_freeze_listener() 662 let mut vec_alloc = KVVec::<Arc<Process>>::new(); in add_freeze_listener() 685 pub(crate) fn remove_freeze_listener(&self, p: &Process) -> KVVec<Arc<Process>> { in remove_freeze_listener() 704 pub(crate) fn freeze_list<'a>(&'a self, guard: &'a ProcessInner) -> &'a [Arc<Process>] { in freeze_list() 788 Arc::ptr_eq(&self.node, &other.node), in absorb() [all …]
|
| H A D | allocation.rs | 12 sync::{aref::ARef, Arc}, 56 pub(crate) process: Arc<Process>, 65 process: Arc<Process>, in new() 377 if Arc::ptr_eq(&node_ref.node.owner, &self.alloc.process) { in transfer_binder_object()
|
| /linux/rust/kernel/list/ |
| H A D | arc.rs | 5 //! 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 D | rust_print_main.rs | 22 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 D | alloc.rs | 4 use alloc::{boxed::Box, sync::Arc}; 9 use std::sync::Arc; 100 impl<T> InPlaceInit<T> for Arc<T> { in try_pin_init() 106 let mut this = try_new_uninit!(Arc); in try_pin_init() 107 let Some(slot) = Arc::get_mut(&mut this) else { in try_pin_init() 108 // SAFETY: the Arc has just been created and has no external references in try_pin_init() 115 // SAFETY: All fields have been initialized and this is the only `Arc` to that data. in try_pin_init() 124 let mut this = try_new_uninit!(Arc); in try_init() 125 let Some(slot) = Arc::get_mut(&mut this) else { in try_init() 126 // SAFETY: the Arc ha in try_init() 98 impl<T> InPlaceInit<T> for Arc<T> { global() implementation [all...] |
| /linux/rust/kernel/debugfs/ |
| H A D | entry.rs | 11 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 D | traits.rs | 18 Arc, 131 // Delegate for `Arc<T>`: Support a `Arc<T>` with no lock or an inner lock. 132 impl<T> BinaryWriter for Arc<T> in write_to_slice() 312 // Delegate for `Arc<T>`: Support an `Arc<T>` with an inner lock. in read_from_slice() 313 impl<T: ?Sized + BinaryReader> BinaryReader for Arc<T> { in read_from_slice() 113 impl<T> BinaryWriter for Arc<T> global() implementation 311 impl<T: ?Sized + BinaryReader> BinaryReader for Arc<T> { global() implementation
|
| /linux/rust/kernel/ |
| H A D | devres.rs | 24 Arc, 140 inner: Arc<Inner<T>>, 209 let inner = Arc::pin_init::<Error>( in new() 289 drop(unsafe { Arc::from_raw(inner) }); in devres_node_free_node() 382 drop(unsafe { Arc::from_raw(Arc::as_ptr(&self.inner)) }); in drop()
|
| H A D | fmt.rs | 211 {<T: ?Sized>} crate::sync::Arc<T> {where crate::sync::Arc<T>: core::fmt::Display},
|
| H A D | configfs.rs | 117 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 D | sync.rs | 26 pub use arc::{Arc, ArcBorrow, UniqueArc};
|
| H A D | debugfs.rs | 12 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/pin-init/examples/ |
| H A D | static_init.rs | 17 sync::Arc, 87 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()
|
| H A D | pthread_mutex.rs | 150 sync::Arc, in main() 154 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); in main()
|
| H A D | mutex.rs | 16 sync::Arc, 188 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in insert_new()
|
| /linux/rust/kernel/irq/ |
| H A D | request.rs | 42 impl<T: ?Sized + Handler + Send> Handler for Arc<T> { global() implementation 311 impl<T: ?Sized + ThreadedHandler + Send> ThreadedHandler for Arc<T> { global() implementation
|
| /linux/rust/pin-init/ |
| H A D | README.md | 52 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 D | sgiarcs.h | 58 Arc, Cpu, Fpu, enumerator
|