| /rust/kernel/ |
| A D | std_vendor.rs | 147 $crate::pr_info!("[{}:{}:{}]\n", ::core::file!(), ::core::line!(), ::core::column!()) 155 ::core::file!(), ::core::line!(), ::core::column!(), 156 ::core::stringify!($val), &tmp);
|
| A D | kunit.rs | 10 use core::fmt; 26 core::ptr::from_ref(&args).cast::<c_void>(), in err() 42 core::ptr::from_ref(&args).cast::<c_void>(), in info() 139 ::core::ptr::null(), 211 module_name: core::ptr::null_mut(), in kunit_case() 212 log: core::ptr::null_mut(), in kunit_case() 224 name: core::ptr::null_mut(), in kunit_case_null() 230 module_name: core::ptr::null_mut(), in kunit_case_null() 231 log: core::ptr::null_mut(), in kunit_case_null() 269 ::core::stringify!($name), [all …]
|
| A D | device_id.rs | 8 use core::mem::MaybeUninit; 65 core::mem::size_of::<Self>() in size() 96 raw_ids[i] = unsafe { core::mem::transmute_copy(&ids[i].0) }; 111 infos[i] = MaybeUninit::new(unsafe { core::ptr::read(&ids[i].1) }); 115 core::mem::forget(ids); 122 ids: unsafe { core::mem::transmute_copy(&raw_ids) }, 127 id_infos: unsafe { core::mem::transmute_copy(&infos) }, 180 core::ptr::from_ref(self).cast() in as_ptr() 203 static $module_table_name: [::core::mem::MaybeUninit<u8>; $table_name.raw_ids().size()] = 204 unsafe { ::core::mem::transmute_copy($table_name.raw_ids()) };
|
| A D | dma.rs | 192 impl core::ops::BitOr for Attrs { 199 impl core::ops::BitAnd for Attrs { 206 impl core::ops::Not for Attrs { 305 core::mem::size_of::<T>() > 0, in alloc_attrs() 310 .checked_mul(core::mem::size_of::<T>()) in alloc_attrs() 363 self.count * core::mem::size_of::<T>() in size() 551 let size = self.count * core::mem::size_of::<T>(); in drop() 594 (|| -> ::core::result::Result<_, $crate::error::Error> { 601 ::core::result::Result::Ok( 648 ::core::result::Result::Ok(()) [all …]
|
| A D | sync.rs | 104 unsafe { ::core::mem::MaybeUninit::uninit().assume_init() }; 115 $crate::c_str!(::core::concat!(::core::file!(), ":", ::core::line!()))
|
| A D | lib.rs | 211 fn panic(info: &core::panic::PanicInfo<'_>) -> ! { in panic() 250 let offset: usize = ::core::mem::offset_of!($Container, $($fields)*); 267 ::core::concat!($($asm),*) 280 ::core::arch::asm!( $($asm)*, options(att_syntax), $($rest)* ) 293 ::core::arch::asm!( $($asm)*, $($rest)* ) 328 pub fn file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr { in file_from_location()
|
| A D | jump_label.rs | 23 let _key: *const $keytyp = ::core::ptr::addr_of!($key); 24 let _key: *const $crate::bindings::static_key_false = ::core::ptr::addr_of!((*_key).$field); 56 off = const ::core::mem::offset_of!($keytyp, $field),
|
| A D | alloc.rs | 31 use core::{alloc::Layout, ptr::NonNull}; 53 impl core::ops::BitOr for Flags { 60 impl core::ops::BitAnd for Flags { 67 impl core::ops::Not for Flags {
|
| A D | bug.rs | 42 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(), 68 size = const ::core::mem::size_of::<$crate::bindings::bug_entry>(), 83 $crate::c_str!(::core::file!()).as_char_ptr(), 86 ::core::ptr::null(),
|
| /rust/ |
| A D | ffi.rs | 20 ::core::mem::size_of::<$name>() == ::core::mem::size_of::<::core::ffi::$name>() 48 pub use core::ffi::c_void;
|
| A D | Makefile | 6 obj-$(CONFIG_RUST) += core.o compiler_builtins.o ffi.o 63 core-cfgs = \ 66 core-edition := $(if $(call rustc-min-version,108700),2024,2021) 99 rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \ 119 rustdoc-core: private skip_flags = --edition=2021 -Wrustdoc::unescaped_backticks 120 rustdoc-core: private rustc_target_flags = --edition=$(core-edition) $(core-cfgs) 121 rustdoc-core: $(RUST_LIB_SRC)/core/src/lib.rs rustdoc-clean FORCE 124 rustdoc-compiler_builtins: $(src)/compiler_builtins.rs rustdoc-core FORCE 127 rustdoc-ffi: $(src)/ffi.rs rustdoc-core FORCE
|
| /rust/kernel/alloc/ |
| A D | kbox.rs | 8 use core::alloc::Layout; 9 use core::borrow::{Borrow, BorrowMut}; 10 use core::fmt; 11 use core::marker::PhantomData; 12 use core::mem::ManuallyDrop; 13 use core::mem::MaybeUninit; 14 use core::ops::{Deref, DerefMut}; 15 use core::pin::Pin; 16 use core::ptr::NonNull; 17 use core::result::Result; [all …]
|
| A D | allocator_test.rs | 13 use core::alloc::Layout; 14 use core::cmp; 15 use core::ptr; 16 use core::ptr::NonNull; 79 let min_align = core::mem::size_of::<*const crate::ffi::c_void>(); in realloc()
|
| /rust/kernel/sync/arc/ |
| A D | std_vendor.rs | 11 use core::any::Any; 15 pub fn downcast<T>(self) -> core::result::Result<Arc<T>, Self> in downcast() 23 core::mem::forget(self); in downcast()
|
| /rust/kernel/block/mq/ |
| A D | tag_set.rs | 7 use core::pin::Pin; 16 use core::{convert::TryInto, marker::PhantomData}; 43 let tag_set: bindings::blk_mq_tag_set = unsafe { core::mem::zeroed() }; in new() 44 let tag_set: Result<_> = core::mem::size_of::<RequestDataWrapper>() in new() 55 driver_data: core::ptr::null_mut::<crate::ffi::c_void>(), in new()
|
| A D | gen_disk.rs | 11 use core::fmt::{self, Write}; 97 let mut lim: bindings::queue_limits = unsafe { core::mem::zeroed() }; in build() 110 core::ptr::null_mut(), in build() 133 owner: core::ptr::null_mut(), in build() 134 pr_ops: core::ptr::null_mut(), in build() 160 bindings::device_add_disk(core::ptr::null_mut(), gendisk, core::ptr::null_mut()) in build()
|
| /rust/kernel/fs/ |
| A D | file.rs | 16 use core::ptr; 336 unsafe { core::ptr::addr_of!((*self.as_ptr()).f_flags).read_volatile() } in flags() 360 impl core::ops::Deref for File { 369 unsafe { LocalFile::from_raw_file(core::ptr::from_ref(self).cast()) } in deref() 435 core::mem::forget(self); in fd_install() 436 core::mem::forget(file); in fd_install() 463 impl core::fmt::Debug for BadFdError { 464 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt()
|
| /rust/pin-init/src/ |
| A D | macros.rs | 610 ::core::compile_error!(concat!( 1007 ) -> ::core::result::Result<(), E> { 1018 ) -> ::core::result::Result<(), E> { 1203 $(::core::mem::forget($guards);)* 1280 unsafe { ::core::ptr::write(::core::ptr::addr_of_mut!((*$slot).$field), $field) }; 1314 let mut zeroed = ::core::mem::zeroed(); 1317 ::core::ptr::write($slot, zeroed); 1318 zeroed = ::core::mem::zeroed(); 1324 ::core::ptr::write($slot, $t { 1348 ::core::ptr::write($slot, $t { [all …]
|
| /rust/kernel/drm/ |
| A D | ioctl.rs | 111 ::core::assert!(i == $crate::ioctl::_IOC_NR(cmd)); 112 ::core::assert!(core::mem::size_of::<$crate::uapi::$struct>() == 125 raw_data: *mut ::core::ffi::c_void, 127 ) -> core::ffi::c_int { 156 name: $crate::c_str!(::core::stringify!($cmd)).as_char_ptr(),
|
| A D | driver.rs | 46 prime_fd: *mut core::ffi::c_int, 47 ) -> core::ffi::c_int, 53 prime_fd: core::ffi::c_int, 55 ) -> core::ffi::c_int, 75 ) -> core::ffi::c_int, 83 ) -> core::ffi::c_int,
|
| /rust/kernel/sync/lock/ |
| A D | global.rs | 13 use core::{ 101 impl<B: GlobalLockBackend> core::ops::Deref for GlobalGuard<B> { 109 impl<B: GlobalLockBackend> core::ops::DerefMut for GlobalGuard<B> { 259 #[doc = ::core::concat!( 261 ::core::stringify!($name), 263 ::core::stringify!($name), 270 const NAME: &'static $crate::str::CStr = $crate::c_str!(::core::stringify!($name));
|
| /rust/kernel/list/ |
| A D | arc.rs | 10 use core::marker::PhantomPinned; 11 use core::ops::Deref; 12 use core::pin::Pin; 13 use core::sync::atomic::{AtomicBool, Ordering}; 98 unsafe fn on_create_list_arc_from_unique(self: ::core::pin::Pin<&mut Self>) { 103 ::core::pin::Pin::map_unchecked_mut(self, |me| &mut me.$field) 162 #[cfg_attr(CONFIG_RUSTC_HAS_COERCE_POINTEE, derive(core::marker::CoercePointee))] 341 unsafe { core::mem::transmute(self) } in transmute_to_arc() 448 impl<T, U, const ID: u64> core::ops::CoerceUnsized<ListArc<U, ID>> for ListArc<T, ID> impls 450 T: ListArcSafe<ID> + core::marker::Unsize<U> + ?Sized, [all …]
|
| /rust/kernel/device/ |
| A D | property.rs | 7 use core::{mem::MaybeUninit, ptr}; 76 pub fn display_name(&self) -> impl core::fmt::Display + '_ { in display_name() 79 impl core::fmt::Display for FwNodeDisplayName<'_> { in display_name() 80 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in display_name() 221 core::iter::from_fn(move || { in children() 340 unsafe { core::slice::from_raw_parts(self.0.args.as_ptr(), self.0.nargs as usize) } in as_slice() 354 impl core::fmt::Debug for FwNodeReferenceArgs { 355 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() 380 impl core::fmt::Display for FwNode { 381 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() [all …]
|
| /rust/kernel/io/ |
| A D | resource.rs | 8 use core::ops::Deref; 9 use core::ptr::NonNull; 192 impl core::ops::BitOr for Flags { 199 impl core::ops::BitAnd for Flags { 206 impl core::ops::Not for Flags {
|
| /rust/kernel/sync/ |
| A D | arc.rs | 27 use core::{ 131 #[cfg_attr(CONFIG_RUSTC_HAS_COERCE_POINTEE, derive(core::marker::CoercePointee))] 188 impl<T: ?Sized + core::marker::Unsize<U>, U: ?Sized> core::ops::CoerceUnsized<Arc<U>> for Arc<T> {} 192 impl<T: ?Sized + core::marker::Unsize<U>, U: ?Sized> core::ops::DispatchFromDyn<Arc<U>> for Arc<T> … 266 core::mem::forget(self); in into_raw() 268 unsafe { core::ptr::addr_of!((*ptr).data) } in into_raw() 277 unsafe { core::ptr::addr_of!((*ptr).data) } in as_ptr() 310 core::ptr::eq(this.ptr.as_ptr(), other.ptr.as_ptr()) in ptr_eq() 379 const FOREIGN_ALIGN: usize = core::mem::align_of::<ArcInner<T>>(); 572 impl<T: ?Sized + core::marker::Unsize<U>, U: ?Sized> core::ops::DispatchFromDyn<ArcBorrow<'_, U>> [all …]
|