Home
last modified time | relevance | path

Searched refs:slice (Results 1 – 25 of 41) sorted by relevance

12

/DragonOS/kernel/src/bpf/helper/
H A Dmod.rs25 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_lookup_elem()
57 let data = core::slice::from_raw_parts(data as *const u8, size as usize); in raw_perf_event_output()
98 let dst = core::slice::from_raw_parts_mut(dst as *mut u8, size as usize); in raw_bpf_probe_read()
99 let src = core::slice::from_raw_parts(unsafe_ptr as *const u8, size as usize); in raw_bpf_probe_read()
128 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_update_elem()
129 let value = core::slice::from_raw_parts(value as *const u8, value_size); in raw_map_update_elem()
150 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_delete_elem()
218 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_lookup_percpu_elem()
246 let value = core::slice::from_raw_parts(value as *const u8, value_size); in raw_map_push_elem()
267 let value = core::slice::from_raw_parts_mut(value as *mut u8, value_size); in raw_map_pop_elem()
[all …]
/DragonOS/kernel/src/process/
H A Dexec.rs270 fn push_slice<T: Copy>(&self, ustack: &mut UserStack, slice: &[T]) -> Result<(), SystemError> { in push_slice()
272 sp -= core::mem::size_of_val(slice); in push_slice()
275 unsafe { core::slice::from_raw_parts_mut(sp.data() as *mut T, slice.len()) } in push_slice()
276 .copy_from_slice(slice); in push_slice()
/DragonOS/kernel/src/mm/allocator/
H A Dkernel_allocator.rs45 let slice = unsafe { in alloc_in_buddy() localVariable
46 core::slice::from_raw_parts_mut( in alloc_in_buddy()
51 return Ok(NonNull::from(slice)); in alloc_in_buddy()
/DragonOS/kernel/src/perf/
H A Dutil.rs95 unsafe { core::slice::from_raw_parts(self as *const Self as *const u8, size_of::<Self>()) } in as_bytes()
108 unsafe { core::slice::from_raw_parts(self as *const Self as *const u8, size_of::<Self>()) } in as_bytes()
H A Dbpf.rs212 unsafe { core::slice::from_raw_parts(self.ptr as *const u8, self.size) } in as_slice()
215 unsafe { core::slice::from_raw_parts_mut(self.ptr as *mut u8, self.size) } in as_mut_slice()
H A Dkprobe.rs73 core::slice::from_raw_parts_mut( in call()
/DragonOS/kernel/src/driver/firmware/efi/
H A Dtables.rs58 let slice = in report_systable_header() localVariable
59 unsafe { core::slice::from_raw_parts(fw_ptr.data() as *const u16, TMPBUF_SIZE) }; in report_systable_header()
61 let val = slice[i]; in report_systable_header()
139 core::slice::from_raw_parts( in parse_config_tables()
/DragonOS/kernel/src/syscall/
H A Duser_access.rs6 slice::{from_raw_parts, from_raw_parts_mut},
51 let src: &[u8] = core::slice::from_raw_parts(src.data() as *const u8, dst.len()); in copy_from_user()
176 buffer: unsafe { core::slice::from_raw_parts(addr as *const u8, len) }, in new()
284 buffer: unsafe { core::slice::from_raw_parts_mut(addr as *mut u8, len) }, in new()
/DragonOS/kernel/crates/rbpf/src/
H A Dlib.rs1704 let slice = prog.leak(); in new() localVariable
1705 let slice = unsafe { core::slice::from_raw_parts(slice.as_ptr(), data_len) }; in new() localVariable
1706 (Some(slice), data_len, data_cap) in new()
1721 let slice = prog.leak(); in set_program() localVariable
1722 self.parent.set_program(slice)?; in set_program()
/DragonOS/kernel/src/sched/
H A Dfair.rs60 pub slice: u64, field
94 slice: SYSCTL_SHCED_BASE_SLICE.load(Ordering::SeqCst), in new()
477 let slice = self.sched_slice(entity.clone()); in sched_vslice() localVariable
478 return entity.calculate_delta_fair(slice); in sched_vslice()
490 let mut slice = Self::sched_period(nr_running + (!entity.on_rq()) as u64); in sched_slice() localVariable
498 slice = se in sched_slice()
502 .calculate_delta(slice, se.load.weight); in sched_slice()
511 slice = min_gran.max(slice) in sched_slice()
514 slice in sched_slice()
631 se.force_mut().slice = SYSCTL_SHCED_BASE_SLICE.load(Ordering::SeqCst); in update_deadline()
[all …]
/DragonOS/kernel/src/arch/x86_64/process/
H A Dtable.rs67 let gdt: &mut [u64] = core::slice::from_raw_parts_mut(gdt_vaddr.data() as *mut u64, 512); in set_tss_descriptor()
/DragonOS/kernel/src/libs/lib_ui/
H A Dscreen_manager.rs170 unsafe { core::slice::from_raw_parts_mut(vaddr.data() as *mut u8, len) }; in copy_from_nonoverlapping()
174 unsafe { core::slice::from_raw_parts(vaddr.data() as *const u8, len) }; in copy_from_nonoverlapping()
190 core::slice::from_raw_parts(vaddr.data() as *const u8, len) in copy_from_nonoverlapping()
/DragonOS/kernel/src/bpf/map/
H A Dutil.rs22 core::slice::from_raw_parts(u.map_name.as_ptr() as *const u8, u.map_name.len()) in try_from()
/DragonOS/kernel/src/bpf/prog/
H A Dutil.rs94 core::slice::from_raw_parts(u.prog_name.as_ptr() as *const u8, u.prog_name.len()); in try_from()
/DragonOS/kernel/src/filesystem/overlayfs/
H A Dmod.rs46 let slice = unsafe { core::slice::from_raw_parts(raw_data, len) }; in from_row() localVariable
47 let raw_str = core::str::from_utf8(slice).map_err(|_| SystemError::EINVAL)?; in from_row()
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Drender_helper.rs1 use core::slice::Iter;
/DragonOS/kernel/crates/bitmap/src/
H A Dalloc_bitmap.rs109 core::slice::from_raw_parts( in as_bytes()
H A Dstatic_bitmap.rs120 core::slice::from_raw_parts( in as_bytes()
/DragonOS/kernel/src/driver/video/fbdev/
H A Dvesafb.rs351 let slice = unsafe { core::slice::from_raw_parts(vaddr.as_ptr::<u8>(), size as usize) }; in fb_read() localVariable
352 buf[..len].copy_from_slice(&slice[pos as usize..(pos as usize + len)]); in fb_read()
372 let slice = unsafe { core::slice::from_raw_parts_mut(vaddr.as_ptr::<u8>(), size as usize) }; in fb_write() localVariable
373 slice[pos as usize..(pos as usize + len)].copy_from_slice(&buf[..len]); in fb_write()
/DragonOS/kernel/src/filesystem/vfs/
H A Dsyscall.rs1826 let iovs: &[IoVec] = core::slice::from_raw_parts(iov, iovcnt); in from_user()
1841 slices.push(core::slice::from_raw_parts_mut(iov.iov_base, iov.iov_len)); in from_user()
1852 for slice in self.0.iter() { in gather()
1853 buf.extend_from_slice(slice); in gather()
1861 for slice in self.0.iter_mut() { in scatter()
1862 let len = core::cmp::min(slice.len(), data.len()); in scatter()
1867 slice[..len].copy_from_slice(&data[..len]); in scatter()
1880 let total_len: usize = self.0.iter().map(|slice| slice.len()).sum(); in new_buf()
/DragonOS/kernel/src/virt/kvm/
H A Dvcpu_dev.rs174 core::slice::from_raw_parts_mut( in ioctl()
H A Dvm_dev.rs163 core::slice::from_raw_parts_mut( in ioctl()
/DragonOS/kernel/crates/klog_types/src/
H A Dlib.rs75 core::slice::from_raw_parts( in calculate_checksum()
/DragonOS/kernel/src/driver/acpi/
H A Dmod.rs126 core::slice::from_raw_parts( in rsdp_paddr()
/DragonOS/kernel/src/arch/x86_64/mm/
H A Dmod.rs600 let slice = unsafe { in test_buddy() localVariable
601 core::slice::from_raw_parts_mut( in test_buddy()
606 for (i, item) in slice.iter_mut().enumerate() { in test_buddy()

12