MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / read

Function read

src/backend/linux_raw/io/syscalls.rs:35–44  ·  view source on GitHub ↗
(fd: BorrowedFd<'_>, buf: (*mut u8, usize))

Source from the content-addressed store, hash-verified

33
34#[inline]
35pub(crate) unsafe fn read(fd: BorrowedFd<'_>, buf: (*mut u8, usize)) -> io::Result<usize> {
36 let r = ret_usize(syscall!(__NR_read, fd, buf.0, pass_usize(buf.1)));
37
38 #[cfg(sanitize_memory)]
39 if let Ok(len) = r {
40 crate::msan::unpoison(buf.0, len);
41 }
42
43 r
44}
45
46#[inline]
47pub(crate) unsafe fn pread(

Callers 4

init_from_auxv_fileFunction · 0.50
nextMethod · 0.50
init_from_auxpFunction · 0.50
nextMethod · 0.50

Calls 1

ret_usizeFunction · 0.50

Tested by

no test coverage detected