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

Function fcntl_setpipe_size

src/backend/linux_raw/pipe/syscalls.rs:114–135  ·  view source on GitHub ↗
(fd: BorrowedFd<'_>, size: usize)

Source from the content-addressed store, hash-verified

112
113#[inline]
114pub(crate) fn fcntl_setpipe_size(fd: BorrowedFd<'_>, size: usize) -> io::Result<usize> {
115 let size: c::c_int = size.try_into().map_err(|_| io::Errno::PERM)?;
116
117 #[cfg(target_pointer_width = "32")]
118 unsafe {
119 ret_usize(syscall_readonly!(
120 __NR_fcntl64,
121 fd,
122 c_uint(F_SETPIPE_SZ),
123 c_int(size)
124 ))
125 }
126 #[cfg(target_pointer_width = "64")]
127 unsafe {
128 ret_usize(syscall_readonly!(
129 __NR_fcntl,
130 fd,
131 c_uint(F_SETPIPE_SZ),
132 c_int(size)
133 ))
134 }
135}

Callers

nothing calls this directly

Calls 1

ret_usizeFunction · 0.50

Tested by

no test coverage detected