Home
last modified time | relevance | path

Searched refs:a (Results 1 – 25 of 55) sorted by relevance

123

/rust/kernel/block/mq/
A Draw_writer.rs13 pub(crate) struct RawWriter<'a> {
14 buffer: &'a mut [u8],
18 impl<'a> RawWriter<'a> {
20 fn new(buffer: &'a mut [u8]) -> Result<RawWriter<'a>> { in new() argument
28 a: &'a mut [crate::ffi::c_char; N], in from_array()
29 ) -> Result<RawWriter<'a>> { argument
33 unsafe { core::slice::from_raw_parts_mut(a.as_mut_ptr().cast::<u8>(), N) },
/rust/kernel/time/hrtimer/
A Dpin.rs14 pub struct PinHrTimerHandle<'a, T>
18 pub(crate) inner: Pin<&'a T>,
23 unsafe impl<'a, T> HrTimerHandle for PinHrTimerHandle<'a, T>
40 impl<'a, T> Drop for PinHrTimerHandle<'a, T>
51 unsafe impl<'a, T> UnsafeHrTimerPointer for Pin<&'a T>
55 T: HrTimerCallback<Pointer<'a> = Self>,
58 type TimerHandle = PinHrTimerHandle<'a, T>;
77 impl<'a, T> RawHrTimerCallback for Pin<&'a T>
80 T: HrTimerCallback<Pointer<'a> = Self>,
A Dpin_mut.rs11 pub struct PinMutHrTimerHandle<'a, T>
16 _p: PhantomData<&'a mut T>,
21 unsafe impl<'a, T> HrTimerHandle for PinMutHrTimerHandle<'a, T>
38 impl<'a, T> Drop for PinMutHrTimerHandle<'a, T>
49 unsafe impl<'a, T> UnsafeHrTimerPointer for Pin<&'a mut T>
53 T: HrTimerCallback<Pointer<'a> = Self>,
56 type TimerHandle = PinMutHrTimerHandle<'a, T>;
81 impl<'a, T> RawHrTimerCallback for Pin<&'a mut T>
84 T: HrTimerCallback<Pointer<'a> = Self>,
A Darc.rs55 T: for<'a> HrTimerCallback<Pointer<'a> = Self>,
77 T: for<'a> HrTimerCallback<Pointer<'a> = Self>,
79 type CallbackTarget<'a> = ArcBorrow<'a, T>;
A Dtbox.rs64 T: for<'a> HrTimerCallback<Pointer<'a> = Pin<Box<T, A>>>,
99 T: for<'a> HrTimerCallback<Pointer<'a> = Pin<Box<T, A>>>,
102 type CallbackTarget<'a> = Pin<&'a mut T>;
/rust/kernel/io/
A Dmem.rs19 pub struct IoRequest<'a> {
20 device: &'a Device<Bound>,
21 resource: &'a Resource,
24 impl<'a> IoRequest<'a> {
31 pub(crate) unsafe fn new(device: &'a Device<Bound>, resource: &'a Resource) -> Self { in new()
77 pub fn iomap_sized<const SIZE: usize>(self) -> impl PinInit<Devres<IoMem<SIZE>>, Error> + 'a { in iomap_sized() argument
89 ) -> impl PinInit<Devres<ExclusiveIoMem<SIZE>>, Error> + 'a { in iomap_exclusive_sized() argument
135 pub fn iomap(self) -> impl PinInit<Devres<IoMem<0>>, Error> + 'a { in iomap() argument
141 pub fn iomap_exclusive(self) -> impl PinInit<Devres<ExclusiveIoMem<0>>, Error> + 'a { in iomap_exclusive() argument
189 pub fn new<'a>(io_request: IoRequest<'a>) -> impl PinInit<Devres<Self>, Error> + 'a { in new() argument
[all …]
/rust/kernel/sync/
A Dlocked_by.rs125 pub fn access<'a>(&'a self, owner: &'a U) -> &'a T in access()
157 pub fn access_mut<'a>(&'a self, owner: &'a mut U) -> &'a mut T { in access_mut()
A Dlock.rs154 pub unsafe fn from_raw<'a>(ptr: *mut B::State) -> &'a Self { in from_raw()
193 pub struct Guard<'a, T: ?Sized, B: Backend> {
194 pub(crate) lock: &'a Lock<T, B>,
202 impl<'a, T: ?Sized, B: Backend> Guard<'a, T, B> {
229 pub fn lock_ref(&self) -> &'a Lock<T, B> { in lock_ref()
268 impl<'a, T: ?Sized, B: Backend> Guard<'a, T, B> {
274 pub unsafe fn new(lock: &'a Lock<T, B>, state: B::GuardState) -> Self { in new()
A Dpoll.rs31 pub struct PollTable<'a> {
33 _lifetime: PhantomData<&'a bindings::poll_table>,
36 impl<'a> PollTable<'a> {
/rust/kernel/
A Drbtree.rs743 impl<'a, K, V> Cursor<'a, K, V> {
931 impl<'a, K, V> IntoIterator for &'a RBTree<K, V> {
932 type Item = (&'a K, &'a V);
956 impl<'a, K, V> Iterator for Iter<'a, K, V> {
957 type Item = (&'a K, &'a V);
966 type Item = (&'a K, &'a mut V);
991 impl<'a, K, V> Iterator for IterMut<'a, K, V> {
992 type Item = (&'a K, &'a mut V);
1160 impl<'a, K, V> RawVacantEntry<'a, K, V> {
1185 impl<'a, K, V> VacantEntry<'a, K, V> {
[all …]
A Dtypes.rs32 type Borrowed<'a>;
35 type BorrowedMut<'a>;
98 unsafe fn borrow<'a>(ptr: *mut c_void) -> Self::Borrowed<'a>; in borrow() argument
126 unsafe fn borrow_mut<'a>(ptr: *mut c_void) -> Self::BorrowedMut<'a>; in borrow_mut() argument
133 type Borrowed<'a> = ();
134 type BorrowedMut<'a> = ();
142 unsafe fn borrow<'a>(_: *mut c_void) -> Self::Borrowed<'a> {} in borrow() argument
143 unsafe fn borrow_mut<'a>(_: *mut c_void) -> Self::BorrowedMut<'a> {} in borrow_mut() argument
A Ddevres.rs129 pub fn new<'a, E>( in new() argument
130 dev: &'a Device<Bound>, in new()
131 data: impl PinInit<T, E> + 'a, in new() argument
132 ) -> impl PinInit<Self, Error> + 'a in new() argument
134 T: 'a, in new()
240 pub fn access<'a>(&'a self, dev: &'a Device<Bound>) -> Result<&'a T> { in access()
262 pub fn try_access_with_guard<'a>(&'a self, guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
A Dmm.rs132 pub unsafe fn from_raw<'a>(ptr: *const bindings::mm_struct) -> &'a Mm { in from_raw()
162 pub unsafe fn from_raw<'a>(ptr: *const bindings::mm_struct) -> &'a MmWithUser { in from_raw()
234 pub struct MmapReadGuard<'a> {
235 mm: &'a MmWithUser,
240 impl<'a> MmapReadGuard<'a> {
274 pub struct VmaReadGuard<'a> {
275 vma: &'a VmaRef,
A Dlist.rs653 _ty: PhantomData<&'a ListArc<T, ID>>,
656 impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> Iterator for Iter<'a, T, ID> {
657 type Item = ArcBorrow<'a, T>;
826 list: &'a mut List<T, ID>,
831 impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> Cursor<'a, T, ID> {
982 cursor: &'a mut Cursor<'b, T, ID>,
987 CursorPeek<'a, 'b, T, ISNEXT, ID>
1044 impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> FusedIterator for Iter<'a, T, ID> {}
1046 impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> IntoIterator for &'a List<T, ID> {
1047 type IntoIter = Iter<'a, T, ID>;
[all …]
A Dcpumask.rs58 pub unsafe fn as_mut_ref<'a>(ptr: *mut bindings::cpumask) -> &'a mut Self { in as_mut_ref()
72 pub unsafe fn as_ref<'a>(ptr: *const bindings::cpumask) -> &'a Self { in as_ref()
273 pub unsafe fn as_mut_ref<'a>(ptr: *mut bindings::cpumask_var_t) -> &'a mut Self { in as_mut_ref()
287 pub unsafe fn as_ref<'a>(ptr: *const bindings::cpumask_var_t) -> &'a Self { in as_ref()
A Drevocable.rs118 pub fn try_access_with_guard<'a>(&'a self, _guard: &'a rcu::Guard) -> Option<&'a T> { in try_access_with_guard()
235 pub struct RevocableGuard<'a, T> {
242 _p: PhantomData<&'a ()>,
A Dpid_namespace.rs39 pub unsafe fn from_ptr<'a>(ptr: *const bindings::pid_namespace) -> &'a Self { in from_ptr()
A Dseq_file.rs24 pub unsafe fn from_raw<'a>(ptr: *mut bindings::seq_file) -> &'a SeqFile { in from_raw()
/rust/kernel/list/
A Darc_field.rs73 $pub fn $name<'a>(self: &'a $crate::list::ListArc<Self $(, $id)?>) -> &'a $typ {
85 $pub fn $name<'a>(self: &'a mut $crate::list::ListArc<Self $(, $id)?>) -> &'a mut $typ {
/rust/kernel/alloc/
A Dkbox.rs210 pub fn leak<'a>(b: Self) -> &'a mut T { in leak()
410 type Borrowed<'a> = &'a T;
411 type BorrowedMut<'a> = &'a mut T;
423 unsafe fn borrow<'a>(ptr: *mut c_void) -> &'a T { in borrow()
429 unsafe fn borrow_mut<'a>(ptr: *mut c_void) -> &'a mut T { in borrow_mut()
444 type Borrowed<'a> = Pin<&'a T>;
445 type BorrowedMut<'a> = Pin<&'a mut T>;
458 unsafe fn borrow<'a>(ptr: *mut c_void) -> Pin<&'a T> { in borrow()
469 unsafe fn borrow_mut<'a>(ptr: *mut c_void) -> Pin<&'a mut T> { in borrow_mut()
/rust/kernel/sync/lock/
A Dglobal.rs157 pub fn as_ref<'a>(&'a self, _guard: &'a GlobalGuard<B>) -> &'a T { in as_ref()
165 pub fn as_mut<'a>(&'a self, _guard: &'a mut GlobalGuard<B>) -> &'a mut T { in as_mut()
/rust/
A Dbindgen_parameters13 # Packed type cannot transitively contain a `#[repr(align)]` type.
18 # `try` is a reserved keyword since Rust 2018; solved in `bindgen` v0.59.2,
22 # If SMP is disabled, `arch_spinlock_t` is defined as a ZST which triggers a Rust
26 # `seccomp`'s comment gets understood as a doctest
/rust/kernel/device/
A Dproperty.rs77 struct FwNodeDisplayName<'a>(&'a FwNode); in display_name()
218 pub fn children<'a>(&'a self) -> impl Iterator<Item = ARef<FwNode>> + 'a { in children()
299 pub enum NArgs<'a> {
302 Prop(&'a CStr),
375 enum Node<'a> {
376 Borrowed(&'a FwNode),
476 fn read_array_from_fwnode_property<'a>( in read_array_from_fwnode_property()
479 out: &'a mut [MaybeUninit<Self>], in read_array_from_fwnode_property()
480 ) -> Result<&'a mut [Self]>; in read_array_from_fwnode_property()
499 out: &'a mut [MaybeUninit<Self>],
[all …]
/rust/pin-init/
A DREADME.md47 and therefore a nightly compiler. Note that this feature is not enabled by default.
51 To initialize a `struct` with an in-place constructor you will need two things:
69 the Linux kernel. It also uses a wait list and a basic spinlock. Importantly the wait list
75 `#[`[`pin_data`]`]`. It is a macro that uses `#[pin]` as a marker for
86 a: CMutex<usize>,
91 a <- CMutex::new(42),
97 (or just the stack) to actually initialize a `Foo`:
105 ### Using a custom function/macro that returns an initializer
142 `slot` now contains a valid bit pattern for the type `T`,
189 // `slot` contains uninit memory, avoid creating a reference.
[all …]
/rust/pin-init/examples/
A Dbig_struct_in_place.rs10 a: u64, field
34 a: 7, in main()

Completed in 39 milliseconds

123