| /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 …]
|
| /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() 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 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
|
| /linux/ |
| H A D | CREDITS | 2344 D: Arc monochrome LCD framebuffer driver, x86 reboot fixups
|