/linux/rust/kernel/ |
H A D | types.rs | 5 use crate::ffi::c_void; 53 fn into_foreign(self) -> *mut c_void; in into_foreign() argument 63 unsafe fn from_foreign(ptr: *mut c_void) -> Self; in from_foreign() 75 unsafe fn try_from_foreign(ptr: *mut c_void) -> Option<Self> { in try_from_foreign() 98 unsafe fn borrow<'a>(ptr: *mut c_void) -> Self::Borrowed<'a>; in borrow() 126 unsafe fn borrow_mut<'a>(ptr: *mut c_void) -> Self::BorrowedMut<'a>; in borrow_mut() 136 fn into_foreign(self) -> *mut c_void { in into_foreign() argument 140 unsafe fn from_foreign(_: *mut c_void) -> Self {} in from_foreign() 142 unsafe fn borrow<'a>(_: *mut c_void) -> Self::Borrowed<'a> {} in borrow() 143 unsafe fn borrow_mut<'a>(_: *mut c_void) in borrow() [all...] |
H A D | uaccess.rs | 11 ffi::{c_char, c_void}, 22 pub struct UserPtr(*mut c_void); 28 Self(addr as *mut c_void) in from_addr() 33 pub fn from_ptr(addr: *mut c_void) -> Self { in from_ptr() 41 pub fn as_const_ptr(self) -> *const c_void { in as_const_ptr() argument 49 pub fn as_mut_ptr(self) -> *mut c_void { in as_mut_ptr() argument 91 /// use kernel::ffi::c_void; 112 /// use kernel::ffi::c_void; 264 let out_ptr = out.as_mut_ptr().cast::<c_void>(); in read_raw() 307 out.as_mut_ptr().cast::<c_void>(), in read() [all...] |
H A D | io.rs | 8 use crate::{bindings, build_assert, ffi::c_void}; 64 /// # use kernel::{bindings, ffi::c_void, io::{Io, IoRaw}}; 90 /// unsafe { bindings::iounmap(self.0.addr() as *mut c_void); }; 127 unsafe { bindings::$c_fn(addr as *const c_void) } 139 Ok(unsafe { bindings::$c_fn(addr as *const c_void) }) 156 unsafe { bindings::$c_fn(value, addr as *mut c_void) } 168 unsafe { bindings::$c_fn(value, addr as *mut c_void) }
|
H A D | devres.rs | 13 ffi::c_void, 81 /// unsafe { bindings::iounmap(self.0.addr() as *mut c_void); }; 114 callback: unsafe extern "C" fn(*mut c_void), 177 unsafe extern "C" fn devres_callback(ptr: *mut kernel::ffi::c_void) { in devres_callback() argument 309 unsafe extern "C" fn callback<P: ForeignOwnable>(ptr: *mut kernel::ffi::c_void) { in register_foreign() argument
|
H A D | xarray.rs | 10 ffi::c_void, 105 fn iter(&self) -> impl Iterator<Item = NonNull<c_void>> + '_ { in iter() 183 F: FnOnce(NonNull<c_void>) -> U, in load()
|
H A D | seq_file.rs | 40 core::ptr::from_ref(&args).cast::<crate::ffi::c_void>(), in call_printf()
|
H A D | kunit.rs | 26 core::ptr::from_ref(&args).cast::<c_void>(), in err() 42 core::ptr::from_ref(&args).cast::<c_void>(), in info()
|
H A D | prelude.rs | 19 c_ushort, c_void,
|
H A D | error.rs | 403 /// ) -> Result<*mut kernel::ffi::c_void> { 410 // CAST: Casting a pointer to `*const crate::ffi::c_void` is always valid. in from_err_ptr() 411 let const_ptr: *const crate::ffi::c_void = ptr.cast(); in from_err_ptr()
|
H A D | device.rs | 268 core::ptr::from_ref(&msg).cast::<crate::ffi::c_void>(), in printk()
|
H A D | pci.rs | 350 bindings::pci_iounmap(pdev.as_raw(), ioptr as *mut kernel::ffi::c_void); in do_release()
|
H A D | opp.rs | 517 _data: *mut c_void, in config_clks() argument
|
H A D | configfs.rs | 682 /// Null terminated Array of pointers to [`Attribute`]. The type is [`c_void`] 684 UnsafeCell<[*mut kernel::ffi::c_void; N]>,
|
/linux/rust/kernel/alloc/ |
H A D | kbox.rs | 19 use crate::ffi::c_void; 413 fn into_foreign(self) -> *mut c_void { in into_foreign() argument 417 unsafe fn from_foreign(ptr: *mut c_void) -> Self { in from_foreign() 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() 447 fn into_foreign(self) -> *mut c_void { in into_foreign() argument 452 unsafe fn from_foreign(ptr: *mut c_void) -> Self { in from_foreign() 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()
|
H A D | allocator_test.rs | 27 fn libc_aligned_alloc(align: usize, size: usize) -> *mut crate::ffi::c_void; in libc_aligned_alloc() argument 30 fn libc_free(ptr: *mut crate::ffi::c_void); in libc_free() argument 79 let min_align = core::mem::size_of::<*const crate::ffi::c_void>(); in realloc()
|
H A D | allocator.rs | 61 unsafe extern "C" fn(*const crate::ffi::c_void, usize, u32) -> *mut crate::ffi::c_void,
|
/linux/rust/kernel/sync/ |
H A D | arc.rs | 22 ffi::c_void, 384 fn into_foreign(self) -> *mut c_void { in into_foreign() argument 388 unsafe fn from_foreign(ptr: *mut c_void) -> Self { in from_foreign() 399 unsafe fn borrow<'a>(ptr: *mut c_void) -> ArcBorrow<'a, T> { in borrow() 409 unsafe fn borrow_mut<'a>(ptr: *mut c_void) -> ArcBorrow<'a, T> { in borrow_mut()
|
/linux/rust/ |
H A D | ffi.rs | 48 pub use core::ffi::c_void;
|
/linux/rust/kernel/block/mq/ |
H A D | tag_set.rs | 55 driver_data: core::ptr::null_mut::<crate::ffi::c_void>(), in new()
|
H A D | operations.rs | 149 _tagset_data: *mut crate::ffi::c_void, in init_hctx_callback() argument
|
/linux/rust/kernel/drm/ |
H A D | ioctl.rs | 125 raw_data: *mut ::core::ffi::c_void,
|
/linux/rust/kernel/io/ |
H A D | mem.rs | 268 unsafe { bindings::iounmap(self.io.addr() as *mut c_void) } in drop()
|