Home
last modified time | relevance | path

Searched defs:usize (Results 1 – 25 of 202) sorted by relevance

123456789

/DragonOS/kernel/crates/bitmap/src/
H A Dbitmap_core.rs18 pub(crate) fn get(&self, n: usize, data: &[T], index: usize) -> Option<bool> { in get()
33 pub(crate) fn set(&self, n: usize, data: &mut [T], index: usize, value: bool) -> Option<bool> { in set()
46 pub(crate) fn set_all(&self, n: usize, data: &mut [T], value: bool) { in set_all()
61 pub(crate) fn first_index(&self, data: &[T]) -> Option<usize> { in first_index()
73 pub(crate) fn first_false_index(&self, n: usize, data: &[T]) -> Option<usize> { in first_false_index()
84 pub(crate) fn last_index(&self, n: usize, data: &[T]) -> Option<usize> { in last_index()
100 pub(crate) fn last_false_index(&self, n: usize, data: &[T]) -> Option<usize> { in last_false_index()
126 pub(crate) fn next_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in next_index()
149 pub(crate) fn next_false_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in next_false_index()
172 pub(crate) fn prev_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in prev_index()
[all …]
H A Dtraits.rs8 fn set(bits: &mut Self, index: usize, value: bool) -> bool; in set()
10 fn len(bits: &Self) -> usize; in len()
11 fn first_index(bits: &Self) -> Option<usize>; in first_index()
12 fn first_false_index(bits: &Self) -> Option<usize>; in first_false_index()
13 fn last_index(bits: &Self) -> Option<usize>; in last_index()
14 fn last_false_index(bits: &Self) -> Option<usize>; in last_false_index()
15 fn next_index(bits: &Self, index: usize) -> Option<usize>; in next_index()
16 fn next_false_index(bits: &Self, index: usize) -> Option<usize>; in next_false_index()
17 fn prev_index(bits: &Self, index: usize) -> Option<usize>; in prev_index()
18 fn prev_false_index(bits: &Self, index: usize) -> Option<usize>; in prev_false_index()
[all …]
H A Dstatic_bitmap.rs49 fn set(&mut self, index: usize, value: bool) -> Option<bool> { in set()
54 fn len(&self) -> usize { in len()
59 fn size(&self) -> usize { in size()
64 fn first_index(&self) -> Option<usize> { in first_index()
69 fn first_false_index(&self) -> Option<usize> { in first_false_index()
74 fn last_index(&self) -> Option<usize> { in last_index()
79 fn last_false_index(&self) -> Option<usize> { in last_false_index()
84 fn next_index(&self, index: usize) -> Option<usize> { in next_index()
89 fn next_false_index(&self, index: usize) -> Option<usize> { in next_false_index()
94 fn prev_index(&self, index: usize) -> Option<usize> { in prev_index()
[all …]
H A Dalloc_bitmap.rs38 fn set(&mut self, index: usize, value: bool) -> Option<bool> { in set()
43 fn len(&self) -> usize { in len()
48 fn size(&self) -> usize { in size()
53 fn first_index(&self) -> Option<usize> { in first_index()
58 fn first_false_index(&self) -> Option<usize> { in first_false_index()
63 fn last_index(&self) -> Option<usize> { in last_index()
68 fn last_false_index(&self) -> Option<usize> { in last_false_index()
73 fn next_index(&self, index: usize) -> Option<usize> { in next_index()
78 fn next_false_index(&self, index: usize) -> Option<usize> { in next_false_index()
83 fn prev_index(&self, index: usize) -> Option<usize> { in prev_index()
[all …]
/DragonOS/kernel/src/mm/
H A Dc_adapter.rs20 pub unsafe extern "C" fn kzalloc(size: usize, _gfp: u64) -> usize { in kzalloc()
26 pub unsafe extern "C" fn kmalloc(size: usize, _gfp: u64) -> usize { in kmalloc()
32 fn do_kmalloc(size: usize, _zero: bool) -> usize { in do_kmalloc()
59 pub unsafe extern "C" fn kfree(vaddr: usize) -> usize { in kfree()
H A Dsyscall.rs301 len: usize, in mmap()
302 prot_flags: usize, in mmap()
303 map_flags: usize, in mmap()
305 offset: usize, in mmap()
306 ) -> Result<usize, SystemError> { in mmap()
369 old_len: usize, in mremap()
370 new_len: usize, in mremap()
373 ) -> Result<usize, SystemError> { in mremap()
450 pub fn munmap(start_vaddr: VirtAddr, len: usize) -> Result<usize, SystemError> { in munmap()
482 len: usize, in mprotect()
[all …]
/DragonOS/kernel/src/driver/tty/
H A Dconsole.rs34 sy: usize, in con_clear()
35 sx: usize, in con_clear()
36 height: usize, in con_clear()
37 width: usize, in con_clear()
65 count: usize, in con_putcs()
76 _pos: usize, in con_getxy()
77 ) -> Result<(usize, usize, usize), SystemError> { in con_getxy() argument
129 top: usize, in con_scroll()
130 bottom: usize, in con_scroll()
132 nr: usize, in con_scroll()
/DragonOS/kernel/src/arch/x86_64/init/
H A Dmod.rs56 MMArch::phys_2_virt(PhysAddr::new(&GDT_Table as *const usize as usize)).unwrap(); in kernel_main() constant
58 MMArch::phys_2_virt(PhysAddr::new(&IDT_Table as *const usize as usize)).unwrap(); in kernel_main() constant
59 gdtp.base = gdt_vaddr.data() as *const usize; in kernel_main() constant
63 base: idt_vaddr.data() as *const usize, in kernel_main() constant
89 MMArch::phys_2_virt(PhysAddr::new(&GDT_Table as *const usize as usize)).unwrap(); in early_setup_arch() constant
91 MMArch::phys_2_virt(PhysAddr::new(&IDT_Table as *const usize as usize)).unwrap(); in early_setup_arch() constant
123 fn set_current_core_tss(stack_start: usize, ist0: usize) { in set_current_core_tss()
/DragonOS/kernel/src/driver/base/block/
H A Dblock_device.rs46 pub fn new(lba_start: usize, lba_end: usize) -> Option<Self> { in new()
54 pub fn len(&self) -> usize { in len()
97 pub fn new(start_addr: usize, end_addr: usize, blk_size_log2: u8) -> BlockIter { in new()
105 pub fn new_multiblock(start_addr: usize, end_addr: usize, blk_size_log2: u8) -> BlockIter { in new_multiblock()
190 pub fn len(&self) -> usize { in len()
203 pub fn origin_begin(&self) -> usize { in origin_begin()
207 pub fn origin_end(&self) -> usize { in origin_end()
214 pub fn __bytes_to_lba(addr: usize, blk_size: usize) -> BlockId { in __bytes_to_lba()
220 pub fn __lba_to_bytes(lba_id: usize, blk_size: usize) -> BlockId { in __lba_to_bytes()
239 pub fn id(&self) -> usize { in id()
[all …]
/DragonOS/kernel/src/arch/x86_64/process/
H A Dsyscall.rs56 pub fn arch_prctl(option: usize, arg2: usize) -> Result<usize, SystemError> { in arch_prctl()
67 option: usize, in do_arch_prctl_64()
68 arg2: usize, in do_arch_prctl_64()
70 ) -> Result<usize, SystemError> { in do_arch_prctl_64()
112 pub fn do_arch_prctl_common(_option: usize, _arg2: usize) -> Result<usize, SystemError> { in do_arch_prctl_common()
/DragonOS/kernel/src/filesystem/vfs/
H A Dopen.rs28 ) -> Result<usize, SystemError> { in do_faccessat()
55 pub fn do_fchmodat(dirfd: i32, path: *const u8, _mode: ModeType) -> Result<usize, SystemError> { in do_fchmodat()
73 uid: usize, in do_fchownat()
74 gid: usize, in do_fchownat()
76 ) -> Result<usize, SystemError> { in do_fchownat()
105 fn chown_common(inode: Arc<dyn IndexNode>, uid: usize, gid: usize) -> Result<usize, SystemError> { in chown_common()
139 pub fn ksys_fchown(fd: i32, uid: usize, gid: usize) -> Result<usize, SystemError> { in ksys_fchown()
158 ) -> Result<usize, SystemError> { in do_sys_open()
168 ) -> Result<usize, SystemError> { in do_sys_openat2()
251 ) -> Result<usize, SystemError> {
[all …]
H A Dsyscall.rs489 ) -> Result<usize, SystemError> { in open()
511 ) -> Result<usize, SystemError> { in openat()
526 pub fn close(fd: usize) -> Result<usize, SystemError> { in close()
541 pub fn ioctl(fd: usize, cmd: u32, data: usize) -> Result<usize, SystemError> { in ioctl()
562 pub fn read(fd: i32, buf: &mut [u8]) -> Result<usize, SystemError> { in read()
584 pub fn write(fd: i32, buf: &[u8]) -> Result<usize, SystemError> { in write()
604 pub fn lseek(fd: i32, offset: i64, seek: u32) -> Result<usize, SystemError> { in lseek()
631 pub fn pread(fd: i32, buf: &mut [u8], len: usize, offset: usize) -> Result<usize, SystemError> { in pread()
653 pub fn pwrite(fd: i32, buf: &[u8], len: usize, offset: usize) -> Result<usize, SystemError> { in pwrite()
690 pub fn chdir(path: *const u8) -> Result<usize, SystemError> { in chdir()
[all …]
/DragonOS/kernel/src/driver/video/console/
H A Ddummycon.rs38 _pos: usize, in con_getxy()
39 ) -> Result<(usize, usize, usize), SystemError> { in con_getxy() argument
84 _sy: usize, in con_clear()
85 _sx: usize, in con_clear()
86 _height: usize, in con_clear()
87 _width: usize, in con_clear()
106 _count: usize, in con_putcs()
128 _top: usize, in con_scroll()
129 _bottom: usize, in con_scroll()
131 _nr: usize, in con_scroll()
/DragonOS/kernel/src/perf/
H A Dmod.rs84 fn do_poll(&self) -> Result<usize> { in do_poll()
107 fn mmap(&self, start: usize, len: usize, offset: usize) -> Result<()> { in mmap()
118 _offset: usize, in read_at()
119 _len: usize, in read_at()
122 ) -> Result<usize> { in read_at()
128 _offset: usize, in write_at()
129 _len: usize, in write_at()
132 ) -> Result<usize> { in write_at()
136 fn poll(&self, _private_data: &FilePrivateData) -> Result<usize> { in poll()
153 fn ioctl(&self, cmd: u32, data: usize, _private_data: &FilePrivateData) -> Result<usize> { in ioctl()
[all …]
H A Dbpf.rs55 pub fn new_init(start: usize, len: usize, phys_addr: PhysAddr) -> Self { in new_init()
59 fn init(ptr: *mut u8, size: usize, phys_addr: PhysAddr) -> Self { in init()
82 fn can_write(&self, data_size: usize, data_tail: usize, data_head: usize) -> bool { in can_write()
157 fn write_any(&mut self, data: &[u8], data_head: usize) -> Result<usize> { in write_any()
174 fn write_sample(&mut self, data: &[u8], data_head: usize) -> Result<usize> { in write_sample()
193 fn write_lost(&mut self, data_head: usize) -> Result<usize> { in write_lost()
233 pub fn do_mmap(&self, _start: usize, len: usize, offset: usize) -> Result<()> { in do_mmap()
279 fn mmap(&self, start: usize, len: usize, offset: usize) -> Result<()> { in mmap()
285 _offset: usize, in read_at()
286 _len: usize, in read_at()
[all …]
/DragonOS/kernel/src/libs/
H A Dalign.rs24 const fn max(a: usize, b: usize) -> usize { in max()
133 pub const fn page_align_up(addr: usize) -> usize { in page_align_up()
138 pub const fn page_align_down(addr: usize) -> usize { in page_align_down()
143 pub const fn align_up(addr: usize, align: usize) -> usize { in align_up()
148 pub const fn align_down(addr: usize, align: usize) -> usize { in align_down()
164 pub fn check_aligned(value: usize, align: usize) -> bool { in check_aligned()
/DragonOS/kernel/src/net/
H A Dsyscall.rs37 address_family: usize, in socket()
38 socket_type: usize, in socket()
39 protocol: usize, in socket()
40 ) -> Result<usize, SystemError> { in socket()
65 address_family: usize, in socketpair()
66 socket_type: usize, in socketpair()
67 protocol: usize, in socketpair()
69 ) -> Result<usize, SystemError> { in socketpair()
106 fd: usize, in setsockopt()
107 level: usize, in setsockopt()
[all …]
/DragonOS/kernel/src/filesystem/procfs/
H A Dkmsg.rs60 pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read()
70 fn read_all(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_all()
81 fn read_level(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_level()
103 pub fn read_clear(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_clear()
111 pub fn clear(&mut self) -> Result<usize, SystemError> { in clear()
119 pub fn set_level(&mut self, log_level: usize) -> Result<usize, SystemError> { in set_level()
139 fn tobytes(&mut self) -> usize { in tobytes()
156 pub fn data_size(&mut self) -> Result<usize, SystemError> { in data_size()
/DragonOS/kernel/src/driver/tty/tty_ldisc/
H A Dmod.rs32 len: usize, in read()
34 offset: usize, in read()
36 ) -> Result<usize, SystemError>; in read()
41 len: usize, in write()
43 ) -> Result<usize, SystemError>; in write()
44 fn ioctl(&self, tty: Arc<TtyCore>, cmd: u32, arg: usize) -> Result<usize, SystemError>; in ioctl()
51 fn poll(&self, tty: Arc<TtyCore>) -> Result<usize, SystemError>; in poll()
60 count: usize, in receive_buf()
61 ) -> Result<usize, SystemError>; in receive_buf()
69 count: usize, in receive_buf2()
[all …]
/DragonOS/kernel/src/net/event_poll/
H A Dsyscall.rs18 pub fn epoll_create(max_size: i32) -> Result<usize, SystemError> { in epoll_create()
26 pub fn epoll_create1(flag: usize) -> Result<usize, SystemError> { in epoll_create1()
38 ) -> Result<usize, SystemError> { in epoll_wait()
66 pub fn epoll_ctl(epfd: i32, op: usize, fd: i32, event: VirtAddr) -> Result<usize, SystemError> { in epoll_ctl()
97 ) -> Result<usize, SystemError> { in epoll_pwait()
/DragonOS/kernel/src/filesystem/sysfs/
H A Dfile.rs60 pub fn callback_read(&self, buf: &mut [u8], offset: usize) -> Result<usize, SystemError> { in callback_read()
83 pub fn callback_write(&self, buf: &[u8], offset: usize) -> Result<usize, SystemError> { in callback_write()
298 offset: usize, in read()
299 ) -> Result<usize, SystemError> { in read()
307 offset: usize, in write()
308 ) -> Result<usize, SystemError> { in write()
330 offset: usize, in read()
331 ) -> Result<usize, SystemError> { in read()
339 _offset: usize, in write()
340 ) -> Result<usize, SystemError> { in write()
[all …]
/DragonOS/kernel/crates/ida/src/
H A Dlib.rs60 pub const fn new(initial_id: usize, max_id: usize) -> Option<Self> { in new()
75 pub fn available(&self) -> usize { in available()
84 pub fn alloc(&mut self) -> Option<usize> { in alloc()
124 fn do_find_first_free_index(&self, start_id: usize, end: usize) -> Option<usize> { in do_find_first_free_index()
133 pub fn free(&mut self, id: usize) { in free()
143 pub fn used(&self) -> usize { in used()
148 pub fn get_max_id(&self) -> usize { in get_max_id()
/DragonOS/kernel/crates/rust-slabmalloc/src/
H A Dpages.rs11 fn initialize(&mut self, for_size: usize, capacity: usize); in initialize()
14 base_addr: usize, in first_fit()
16 page_size: usize, in first_fit()
17 ) -> Option<(usize, usize)>; in first_fit() argument
19 fn set_bit(&self, idx: usize); in set_bit()
20 fn clear_bit(&self, idx: usize); in clear_bit()
38 fn initialize(&mut self, for_size: usize, capacity: usize) { in initialize()
58 base_addr: usize, in first_fit()
60 page_size: usize, in first_fit()
61 ) -> Option<(usize, usize)> { in first_fit() argument
[all …]
/DragonOS/kernel/src/ipc/
H A Dsyscall.rs51 pub fn pipe2(fd: *mut i32, flags: FileMode) -> Result<usize, SystemError> { in pipe2()
95 pub fn kill(pid: Pid, sig: c_int) -> Result<usize, SystemError> { in kill()
130 new_act: usize, in sigaction()
131 old_act: usize, in sigaction()
133 ) -> Result<usize, SystemError> { in sigaction()
261 pub fn shmget(key: ShmKey, size: usize, shmflg: ShmFlags) -> Result<usize, SystemError> { in shmget()
308 pub fn shmat(id: ShmId, vaddr: VirtAddr, shmflg: ShmFlags) -> Result<usize, SystemError> { in shmat()
420 pub fn shmdt(vaddr: VirtAddr) -> Result<usize, SystemError> { in shmdt()
483 ) -> Result<usize, SystemError> { in shmctl()
/DragonOS/kernel/src/syscall/
H A Duser_access.rs29 pub unsafe fn clear_user(dest: VirtAddr, len: usize) -> Result<usize, SystemError> { in clear_user()
38 pub unsafe fn copy_to_user(dest: VirtAddr, src: &[u8]) -> Result<usize, SystemError> { in copy_to_user()
48 pub unsafe fn copy_from_user(dst: &mut [u8], src: VirtAddr) -> Result<usize, SystemError> { in copy_from_user()
77 max_length: Option<usize>, in check_and_clone_cstr()
171 pub fn new<U>(addr: *const U, len: usize, from_user: bool) -> Result<Self, SystemError> { in new()
180 pub fn size(&self) -> usize { in size()
209 offset: usize, in copy_from_user()
210 ) -> Result<usize, SystemError> { in copy_from_user()
224 offset: usize, in copy_one_from_user()
279 pub fn new<U>(addr: *mut U, len: usize, from_user: bool) -> Result<Self, SystemError> { in new()
[all …]

123456789