Lines Matching refs:usize
17 const PIPE_BUFF_SIZE: usize = 1024;
77 _offset: usize, in read_at() argument
78 len: usize, in read_at() argument
81 ) -> Result<usize, crate::syscall::SystemError> { in read_at() argument
104 let mut num = inode.valid_cnt as usize; in read_at()
106 let start = inode.read_pos as usize; in read_at()
108 let mut end = (inode.valid_cnt as usize + inode.read_pos as usize) % PIPE_BUFF_SIZE; in read_at()
110 if len < inode.valid_cnt as usize { in read_at()
111 end = (len + inode.read_pos as usize) % PIPE_BUFF_SIZE; in read_at()
156 _offset: usize, in write_at() argument
157 len: usize, in write_at() argument
160 ) -> Result<usize, crate::syscall::SystemError> { in write_at() argument
170 while len + inode.valid_cnt as usize > PIPE_BUFF_SIZE { in write_at()
185 let start = inode.write_pos as usize; in write_at()
186 let end = (inode.write_pos as usize + len) % PIPE_BUFF_SIZE; in write_at()