Home
last modified time | relevance | path

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

12

/DragonOS-0.1.9/kernel/src/process/
Dexec.rs270 fn push_slice<T: Copy>(&self, ustack: &mut UserStack, slice: &[T]) -> Result<(), SystemError> { in push_slice()
272 sp -= slice.len() * core::mem::size_of::<T>(); 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-0.1.9/kernel/src/mm/allocator/
Dkernel_allocator.rs41 let slice = unsafe { in alloc_in_buddy() localVariable
42 core::slice::from_raw_parts_mut( in alloc_in_buddy()
47 return Ok(NonNull::from(slice)); in alloc_in_buddy()
/DragonOS-0.1.9/kernel/src/driver/firmware/efi/
Dtables.rs54 let slice = in report_systable_header() localVariable
55 unsafe { core::slice::from_raw_parts(fw_ptr.data() as *const u16, TMPBUF_SIZE) }; in report_systable_header()
57 let val = slice[i]; in report_systable_header()
135 core::slice::from_raw_parts( in parse_config_tables()
Dinit.rs168 core::slice::from_raw_parts( in uefi_init()
/DragonOS-0.1.9/kernel/src/syscall/
Duser_access.rs5 slice::{from_raw_parts, from_raw_parts_mut},
50 let src: &[u8] = core::slice::from_raw_parts(src.data() as *const u8, dst.len()); in copy_from_user()
171 buffer: unsafe { core::slice::from_raw_parts(addr as *const u8, len) }, in new()
280 buffer: unsafe { core::slice::from_raw_parts_mut(addr as *mut u8, len) }, in new()
Dmod.rs266 core::slice::from_raw_parts_mut::<'static, u8>(buf_vaddr as *mut u8, len) in handle()
458 let data: &[u8] = unsafe { core::slice::from_raw_parts(optval, optlen) }; in handle()
530 let data: &[u8] = unsafe { core::slice::from_raw_parts(buf, len) }; in handle()
567 let buf = unsafe { core::slice::from_raw_parts_mut(buf, len) }; in handle()
661 let buf = unsafe { core::slice::from_raw_parts_mut(buf, size) }; in handle()
/DragonOS-0.1.9/kernel/src/filesystem/vfs/
Dsyscall.rs1059 let iovs: &[IoVec] = core::slice::from_raw_parts(iov, iovcnt); in from_user()
1075 slices.push(core::slice::from_raw_parts_mut(iov.iov_base, iov.iov_len)); in from_user()
1086 for slice in self.0.iter() { in gather()
1087 buf.extend_from_slice(slice); in gather()
1095 for slice in self.0.iter_mut() { in scatter()
1096 let len = core::cmp::min(slice.len(), data.len()); in scatter()
1101 slice[..len].copy_from_slice(&data[..len]); in scatter()
1114 let total_len: usize = self.0.iter().map(|slice| slice.len()).sum(); in new_buf()
Dfile.rs375 ::core::slice::from_raw_parts_mut::<'static, u8>(ptr, name_bytes.len() + 1); in readdir()
/DragonOS-0.1.9/kernel/src/arch/x86_64/process/
Dtable.rs66 let gdt: &mut [u64] = core::slice::from_raw_parts_mut(gdt_vaddr.data() as *mut u64, 512); in set_tss_descriptor()
/DragonOS-0.1.9/kernel/src/libs/lib_ui/
Dscreen_manager.rs164 unsafe { core::slice::from_raw_parts_mut(vaddr.data() as *mut u32, len) }; in copy_from_nonoverlapping()
168 unsafe { core::slice::from_raw_parts(vaddr.data() as *const u32, len) }; in copy_from_nonoverlapping()
184 core::slice::from_raw_parts(vaddr.data() as *const u32, len) in copy_from_nonoverlapping()
/DragonOS-0.1.9/kernel/crates/bitmap/src/
Dalloc_bitmap.rs101 core::slice::from_raw_parts( in as_bytes()
Dstatic_bitmap.rs111 core::slice::from_raw_parts( in as_bytes()
/DragonOS-0.1.9/kernel/src/arch/x86_64/mm/
Dmod.rs552 let slice = unsafe { in test_buddy() localVariable
553 core::slice::from_raw_parts_mut( in test_buddy()
558 for i in 0..slice.len() { in test_buddy()
559 slice[i] = ((i + unsafe { rdtsc() } as usize) % 256) as u8; in test_buddy()
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/
Dvesafb.rs353 let slice = unsafe { core::slice::from_raw_parts(vaddr.as_ptr::<u8>(), size as usize) }; in fb_read() localVariable
354 buf[..len].copy_from_slice(&slice[pos as usize..(pos as usize + len)]); in fb_read()
374 let slice = unsafe { core::slice::from_raw_parts_mut(vaddr.as_ptr::<u8>(), size as usize) }; in fb_write() localVariable
375 slice[pos as usize..(pos as usize + len)].copy_from_slice(&buf[..len]); in fb_write()
/DragonOS-0.1.9/kernel/src/virt/kvm/
Dvcpu_dev.rs168 core::slice::from_raw_parts_mut( in ioctl()
Dvm_dev.rs157 core::slice::from_raw_parts_mut( in ioctl()
/DragonOS-0.1.9/kernel/src/driver/acpi/
Dmod.rs124 unsafe { core::slice::from_raw_parts(rsdp_vaddr as usize as *const u8, size) }; in rsdp_paddr()
Dsysfs.rs253 core::slice::from_raw_parts( in read()
/DragonOS-0.1.9/kernel/crates/klog_types/src/
Dlib.rs75 core::slice::from_raw_parts( in calculate_checksum()
/DragonOS-0.1.9/kernel/src/driver/multiboot2/
Dmultiboot2.h238 unsigned int slice; member
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/vmx/
Dvcpu.rs19 use core::slice;
469 let descriptor_table = unsafe { slice::from_raw_parts(gdt_base, gdt_size.into()) }; in get_segment_base()
/DragonOS-0.1.9/kernel/src/net/
Dsyscall.rs653 let buf = core::slice::from_raw_parts_mut(addr as *mut u8, to_write); in write_to_user()
654 buf.copy_from_slice(core::slice::from_raw_parts( in write_to_user()
/DragonOS-0.1.9/kernel/src/driver/net/e1000e/
De1000e.rs10 use core::slice::{from_raw_parts, from_raw_parts_mut};
/DragonOS-0.1.9/kernel/src/arch/x86_64/interrupt/
Dentry.rs574 let idt_entry = core::slice::from_raw_parts_mut(idt_vaddr.data() as *mut u64, 2); in get_idt_entry()
/DragonOS-0.1.9/kernel/src/libs/
Delf.rs563 core::slice::from_raw_parts( in load()

12