Home
last modified time | relevance | path

Searched refs:usize (Results 1 – 25 of 30) sorted by relevance

12

/rust/kernel/
Dsizes.rs8 pub const SZ_1K: usize = bindings::SZ_1K as usize;
10 pub const SZ_2K: usize = bindings::SZ_2K as usize;
12 pub const SZ_4K: usize = bindings::SZ_4K as usize;
14 pub const SZ_8K: usize = bindings::SZ_8K as usize;
16 pub const SZ_16K: usize = bindings::SZ_16K as usize;
18 pub const SZ_32K: usize = bindings::SZ_32K as usize;
20 pub const SZ_64K: usize = bindings::SZ_64K as usize;
22 pub const SZ_128K: usize = bindings::SZ_128K as usize;
24 pub const SZ_256K: usize = bindings::SZ_256K as usize;
26 pub const SZ_512K: usize = bindings::SZ_512K as usize;
Dpage.rs15 pub const PAGE_SHIFT: usize = bindings::PAGE_SHIFT as usize;
18 pub const PAGE_SIZE: usize = bindings::PAGE_SIZE;
21 pub const PAGE_MASK: usize = !(PAGE_SIZE - 1);
27 pub const fn page_align(addr: usize) -> usize { in page_align() argument
148 off: usize, in with_pointer_into_page() argument
149 len: usize, in with_pointer_into_page() argument
175 pub unsafe fn read_raw(&self, dst: *mut u8, offset: usize, len: usize) -> Result { in read_raw() argument
197 pub unsafe fn write_raw(&self, src: *const u8, offset: usize, len: usize) -> Result { in write_raw() argument
217 pub unsafe fn fill_zero_raw(&self, offset: usize, len: usize) -> Result { in fill_zero_raw() argument
243 offset: usize, in copy_from_user_slice_raw() argument
[all …]
Dpage_size_compat.rs13 pub fn __page_shift() -> usize { in __page_shift()
38 pub fn __page_size() -> usize { in __page_size()
46 pub fn __page_mask() -> usize { in __page_mask()
54 pub fn __page_align(addr: usize) -> usize { in __page_align() argument
65 pub fn __page_align_down(addr: usize) -> usize { in __page_align_down() argument
Duaccess.rs18 pub type UserPtr = usize;
107 length: usize,
123 pub fn new(ptr: UserPtr, length: usize) -> Self { in new()
172 length: usize,
179 pub fn skip(&mut self, num_skip: usize) -> Result { in skip()
202 pub fn len(&self) -> usize { in len() argument
363 length: usize,
370 pub fn len(&self) -> usize { in len() argument
445 fn raw_strncpy_from_user(dst: &mut [MaybeUninit<u8>], src: UserPtr) -> Result<usize> { in raw_strncpy_from_user() argument
463 Ok(res as usize) in raw_strncpy_from_user()
Dioctl.rs13 const fn _IOC(dir: u32, ty: u32, nr: u32, size: usize) -> u32 { in _IOC()
17 build_assert!(size <= (uapi::_IOC_SIZEMASK as usize)); in _IOC()
70 pub const fn _IOC_SIZE(nr: u32) -> usize { in _IOC_SIZE() argument
71 ((nr >> uapi::_IOC_SIZESHIFT) & uapi::_IOC_SIZEMASK) as usize in _IOC_SIZE()
Dstr.rs18 pub const fn len(&self) -> usize { in len() argument
157 pub const fn len(&self) -> usize { in len() argument
163 pub const fn len_with_nul(&self) -> usize { in len_with_nul() argument
454 impl Index<ops::RangeFrom<usize>> for CStr {
458 fn index(&self, index: ops::RangeFrom<usize>) -> &Self::Output { in index()
482 impl CStrIndex for usize {} implementation
483 impl CStrIndex for ops::Range<usize> {}
484 impl CStrIndex for ops::RangeInclusive<usize> {}
485 impl CStrIndex for ops::RangeToInclusive<usize> {}
605 bytes[i as usize] = i.wrapping_add(1); in test_cstr_display_all_bytes()
[all …]
Dsecurity.rs60 seclen: usize,
75 seclen: seclen as usize, in from_secid()
87 pub fn len(&self) -> usize { in len() argument
Dtypes.rs461 u8, u16, u32, u64, usize,
467 {<T: FromBytes, const N: usize>} [T; N],
517 u8, u16, u32, u64, usize,
526 {<T: AsBytes, const N: usize>} [T; N],
Dworkqueue.rs436 const OFFSET: usize;
445 fn get_work_offset(&self) -> usize { in get_work_offset() argument
504 const OFFSET: usize = ::core::mem::offset_of!(Self, $field) as usize;
Dmiscdevice.rs154 fn read_iter(_kiocb: Kiocb<'_, Self::Ptr>, _iov: &mut IovIter) -> Result<usize> { in read_iter() argument
159 fn write_iter(_kiocb: Kiocb<'_, Self::Ptr>, _iov: &mut IovIter) -> Result<usize> { in write_iter() argument
172 _arg: usize, in ioctl() argument
189 _arg: usize, in compat_ioctl() argument
246 pub fn copy_from_iter(&mut self, buf: &mut [u8]) -> usize { in copy_from_iter() argument
Dmm.rs223 pub fn lock_vma_under_rcu(&self, vma_addr: usize) -> Option<VmaReadGuard<'_>> { in lock_vma_under_rcu()
291 pub fn vma_lookup(&self, vma_addr: usize) -> Option<&virt::VmaRef> { in vma_lookup()
Dfirmware.rs94 pub fn size(&self) -> usize { in size() argument
Dinit.rs1082 pub fn init_array_from_fn<I, const N: usize, T, E>( in init_array_from_fn() argument
1083 mut make_init: impl FnMut(usize) -> I, in init_array_from_fn()
1126 pub fn pin_init_array_from_fn<I, const N: usize, T, E>( in pin_init_array_from_fn() argument
1127 mut make_init: impl FnMut(usize) -> I, in pin_init_array_from_fn()
1381 u8, u16, u32, u64, u128, usize,
1426 {<const N: usize, T: Zeroable>} [T; N], {<T: Zeroable>} Wrapping<T>,
Dprint.rs37 const LENGTH_PREFIX: usize = 2;
40 pub const LENGTH: usize = 10;
/rust/kernel/alloc/
Dlayout.rs18 len: usize,
29 const ISIZE_MAX: usize = isize::MAX as usize;
46 pub const fn new(len: usize) -> Result<Self, LayoutError> { in new()
64 pub unsafe fn new_unchecked(len: usize) -> Self { in new_unchecked()
74 pub const fn len(&self) -> usize { in len() argument
Dkvec.rs110 len: usize,
180 pub fn capacity(&self) -> usize { in capacity() argument
182 usize::MAX in capacity()
190 pub fn len(&self) -> usize { in len() argument
201 pub unsafe fn inc_len(&mut self, additional: usize) { in inc_len() argument
217 unsafe fn dec_len(&mut self, count: usize) -> &mut [T] { in dec_len()
386 index: usize, in insert_within_capacity() argument
454 pub fn remove(&mut self, i: usize) -> Result<T, RemoveError> { in remove()
490 pub fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
539 pub unsafe fn from_raw_parts(ptr: *mut T, length: usize, capacity: usize) -> Self { in from_raw_parts() argument
[all …]
Dallocator_test.rs38 fn libc_aligned_alloc(align: usize, size: usize) -> *mut crate::ffi::c_void; in libc_aligned_alloc() argument
/rust/kernel/list/
Dimpl_list_item_mod.rs22 const OFFSET: usize;
57 const OFFSET: usize = ::core::mem::offset_of!(Self, $($field).*) as usize;
100 const OFFSET: usize = ::core::mem::offset_of!(Self, $field) as usize;
/rust/kernel/block/mq/
Draw_writer.rs15 pos: usize,
27 pub(crate) fn from_array<const N: usize>( in from_array()
/rust/kernel/mm/
Dvirt.rs81 pub fn start(&self) -> usize { in start() argument
89 pub fn end(&self) -> usize { in end() argument
116 pub fn zap_page_range_single(&self, address: usize, size: usize) { in zap_page_range_single() argument
194 pub fn vm_insert_page(&self, address: usize, page: &Page) -> Result { in vm_insert_page() argument
/rust/uapi/
Dlib.rs30 type __kernel_size_t = usize;
/rust/
Dffi.rs42 c_ulong = usize;
Dbindgen_parameters3 # We want to map these types to `isize`/`usize` manually, instead of
/rust/bindings/
Dlib.rs32 type __kernel_size_t = usize;
/rust/macros/
Dpinned_drop.rs11 let mut nesting: usize = 0; in pinned_drop()

12