Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 33) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/mm/allocator/
Dbump.rs14 offset: usize, field
25 pub fn new(areas: &'static [PhysMemoryArea], offset: usize) -> Self { in new()
28 offset, in new()
37 pub fn offset(&self) -> usize { in offset() method
38 return self.offset; in offset()
48 let mut offset = self.offset(); in allocate() localVariable
59 if offset >= area_end { in allocate()
64 if offset < area_base { in allocate()
65 offset = area_base; in allocate()
66 } else if offset < area_end { in allocate()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dfile.rs91 offset: usize, field
110 offset: 0, in new()
137 if self.offset > self.inode.metadata()?.size as usize { in read()
143 .read_at(self.offset, len, buf, &mut self.private_data)?; in read()
144 self.offset += len; in read()
164 if self.offset > file_size { in write()
165 self.inode.resize(self.offset)?; in write()
169 .write_at(self.offset, len, buf, &mut self.private_data)?; in write()
170 self.offset += len; in write()
198 SeekFrom::SeekSet(offset) => { in lseek()
[all …]
DVFS.h181 …*vfs_filldir_t)(void *buf, ino_t d_ino, char *name, int namelen, unsigned char type, off_t offset);
189 long (*lseek)(struct vfs_file_t *file_ptr, long offset, long origin);
Dmount.rs152 offset: usize, in read_at()
157 return self.inner_inode.read_at(offset, len, buf, data); in read_at()
162 offset: usize, in write_at()
167 return self.inner_inode.write_at(offset, len, buf, data); in write_at()
/DragonOS-0.1.8/kernel/src/io/
Ddevice.rs35 fn read_at(&self, offset: usize, len: usize, buf: &mut [u8]) -> Result<usize, SystemError>; in read_at()
42 fn write_at(&self, offset: usize, len: usize, buf: &[u8]) -> Result<usize, SystemError>; in write_at()
109 fn read_at(&self, offset: usize, len: usize, buf: &mut [u8]) -> Result<usize, SystemError> { in read_at()
114 let iter = BlockIter::new_multiblock(offset, offset + len, self.blk_size_log2()); in read_at()
119 let buf_begin = range.origin_begin() - offset; // 本次读操作的起始位置/已经读了这么多字节 in read_at()
120 let buf_end = range.origin_end() - offset; in read_at()
145 fn write_at(&self, offset: usize, len: usize, buf: &[u8]) -> Result<usize, SystemError> { in write_at()
151 let iter = BlockIter::new_multiblock(offset, offset + len, self.blk_size_log2()); in write_at()
155 let buf_begin = range.origin_begin() - offset; // 本次读操作的起始位置/已经读了这么多字节 in write_at()
156 let buf_end = range.origin_end() - offset; in write_at()
/DragonOS-0.1.8/kernel/src/arch/
Dmod.rs13 fn read_config(bus_device_function: &BusDeviceFunction, offset: u8) -> u32; in read_config()
18 fn write_config(bus_device_function: &BusDeviceFunction, offset: u8, data: u32); in write_config()
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dentry.rs85 offset: u64, in read()
87 if offset >= self.size() { in read()
92 let start_cluster_number: u64 = offset / fs.bytes_per_cluster(); in read()
102 let bytes_remain: u64 = self.size() - offset; in read()
105 let mut in_cluster_offset: u64 = offset % fs.bytes_per_cluster(); in read()
132 let offset = fs.cluster_bytes_offset(current_cluster) + in_cluster_offset; in read() localVariable
134 offset as usize, in read()
162 offset: u64, in write()
164 self.ensure_len(fs, offset, buf.len() as u64)?; in write()
167 let start_cluster_num = offset / fs.bytes_per_cluster(); in write()
[all …]
Dfs.rs225 offset: Option<u64>, field
1174 let offset: usize = self.cluster_bytes_offset(cluster) as usize; in zero_cluster() localVariable
1178 .write_at(offset, zeros.len(), zeros.as_slice())?; in zero_cluster()
1232 fsinfo.offset = Some(in_disk_fs_info_offset); in new()
1302 if let Some(off) = self.offset { in flush()
1331 if let Some(off) = self.offset { in update()
1357 offset: usize, in read_at()
1368 offset as u64, in read_at()
1385 offset: usize, in write_at()
1395 let r = f.write(fs, &buf[0..len], offset as u64); in write_at()
[all …]
/DragonOS-0.1.8/kernel/src/arch/x86_64/pci/
Dpci.rs15 fn read_config(bus_device_function: &BusDeviceFunction, offset: u8) -> u32 { in read_config()
20 | (offset & 0xfc) as u32 in read_config()
30 fn write_config(bus_device_function: &BusDeviceFunction, offset: u8, data: u32) { in write_config()
34 | (offset & 0xfc) as u32 in write_config()
/DragonOS-0.1.8/kernel/src/libs/
Dvec_cursor.rs134 SeekFrom::SeekSet(offset) => { in seek()
135 pos = offset; in seek()
137 SeekFrom::SeekCurrent(offset) => { in seek()
138 pos = self.pos as i64 + offset; in seek()
140 SeekFrom::SeekEnd(offset) => { in seek()
142 pos = self.data.len() as i64 + offset; in seek()
Dlz4.c467 LZ4_memcpy_using_offset_base(BYTE *dstPtr, const BYTE *srcPtr, BYTE *dstEnd, const size_t offset) in LZ4_memcpy_using_offset_base() argument
469 assert(srcPtr + offset == dstPtr); in LZ4_memcpy_using_offset_base()
470 if (offset < 8) in LZ4_memcpy_using_offset_base()
477 srcPtr += inc32table[offset]; in LZ4_memcpy_using_offset_base()
479 srcPtr -= dec64table[offset]; in LZ4_memcpy_using_offset_base()
515 LZ4_memcpy_using_offset(BYTE *dstPtr, const BYTE *srcPtr, BYTE *dstEnd, const size_t offset) in LZ4_memcpy_using_offset() argument
521 switch (offset) in LZ4_memcpy_using_offset()
536 LZ4_memcpy_using_offset_base(dstPtr, srcPtr, dstEnd, offset); in LZ4_memcpy_using_offset()
1185 U32 offset = 0; in LZ4_compress_generic_validated() local
1334 offset = current - matchIndex; in LZ4_compress_generic_validated()
[all …]
/DragonOS-0.1.8/docs/userland/libc/apis/api-list/
Dunistd.md23 ``off_t lseek(int fd,off_t offset,int whence)`` : 调整文件访问位置
43 将堆内存空间加上offset(注意,该系统调用只应在普通进程中调用,而不能是内核线程)
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dahci_inode.rs117 offset: usize, // lba地址 in read_at()
127 return self.0.lock().disk.read_at(offset, len, buf); in read_at()
136 offset: usize, // lba地址 in write_at()
146 return self.0.lock().disk.write_at(offset, len, buf); in write_at()
/DragonOS-0.1.8/kernel/src/driver/uart/
Duart.rs19 use core::{char, intrinsics::offset, str};
322 fn serial_received(offset: u16) -> bool { in serial_received()
323 if unsafe { io_in8(offset + 5) } & 1 != 0 { in serial_received()
330 fn is_transmit_empty(offset: u16) -> bool { in is_transmit_empty()
331 if unsafe { io_in8(offset + 5) } & 0x20 != 0 { in is_transmit_empty()
397 while *offset(s, i) != '\0' as u8 { in c_uart_send_str()
398 c_uart_send(port, *offset(s, i)); in c_uart_send_str()
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dtransport_pci.rs125 bar: PciArch::read_config(&bus_device_function, capability.offset + CAP_BAR_OFFSET) in new()
127 offset: PciArch::read_config( in new()
129 capability.offset + CAP_BAR_OFFSET_OFFSET, in new()
133 capability.offset + CAP_LENGTH_OFFSET, in new()
145 capability.offset + CAP_NOTIFY_OFF_MULTIPLIER_OFFSET, in new()
370 offset: u32, field
470 if struct_info.offset + struct_info.length > bar_size in get_bar_region()
479 + struct_info.offset as usize; in get_bar_region()
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs119 offset: usize, in read_at()
135 let start = inode.data.len().min(offset); in read_at()
136 let end = inode.data.len().min(offset + len); in read_at()
151 offset: usize, in write_at()
171 if offset + len > data.len() { in write_at()
172 data.resize(offset + len, 0); in write_at()
175 let target = &mut data[offset..offset + len]; in write_at()
/DragonOS-0.1.8/user/libs/libc/src/
Dunistd.c54 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
56 return (off_t)syscall_invoke(SYS_LSEEK, fd, offset, whence, 0, 0, 0, 0, 0); in lseek()
/DragonOS-0.1.8/user/libs/libc/src/include/export/
Dunistd.h45 off_t lseek(int fd, off_t offset, int whence);
/DragonOS-0.1.8/kernel/src/time/
Dtimeconv.rs85 pub fn time_to_calendar(totalsecs: PosixTimeT, offset: i32) -> CalendarTime { in time_to_calendar()
93 rem += offset as i64; in time_to_calendar()
/DragonOS-0.1.8/kernel/src/driver/pci/
Dpci.h179 uint32_t pci_read_config(uchar bus, uchar slot, uchar func, uchar offset);
190 uint pci_write_config(uchar bus, uchar slot, uchar func, uchar offset, uint32_t data);
Dpci.rs54 pub fn add(self, offset: usize) -> Self { in add()
55 Self(self.0 + offset) in add()
356 return Some(capability.offset); in msix_capability_offset()
365 return Some(capability.offset); in msi_capability_offset()
1489 pub offset: u8, field
1507 let offset = self.next_capability_offset?; in next() localVariable
1510 let capability_header = PciArch::read_config(&self.bus_device_function, offset); in next()
1525 offset, in next()
1537 pub offset: u16, field
1555 let offset = self.next_capability_offset?; in next() localVariable
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs199 offset: usize, in read_status()
204 let start = _pdata.data.len().min(offset); in read_status()
205 let end = _pdata.data.len().min(offset + len); in read_status()
367 offset: usize, in read_at()
393 ProcFileType::ProcStatus => return inode.read_status(offset, len, buf, private_data), in read_at()
398 let start = inode.data.len().min(offset); in read_at()
399 let end = inode.data.len().min(offset + len); in read_at()
/DragonOS-0.1.8/kernel/src/driver/hid/
Dhidparse.c251 parser->data.offset = *offset_ptr; in hid_parse()
523 …_type=%d report_id=%d, offset=%d, size=%d", data->type, data->report_id, data->offset, data->size); in __find_object()
538 (found_data.offset == data->offset)) in __find_object()
575 data->size, data->offset, data->logical_min, data->logical_max, data->attribute); in hid_parse_find_object()
/DragonOS-0.1.8/kernel/src/common/
Dhid.h105 int offset; // offset of data in report member
/DragonOS-0.1.8/kernel/src/mm/
Dmod.rs101 pub fn add(self, offset: usize) -> Self { in add()
102 Self(self.0 + offset) in add()
577 let offset = vaddr.data() - self.start().data(); in rebase() localVariable
578 let new_start = new_base.start().data() + offset; in rebase()

12