1 use crate::{backend, io};
2 use backend::fd::AsFd;
3
4 /// `fcntl(fd, F_RDADVISE, radvisory { offset, len })`
5 ///
6 /// # References
7 /// - [Apple]
8 ///
9 /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fcntl.2.html
10 #[inline]
fcntl_rdadvise<Fd: AsFd>(fd: Fd, offset: u64, len: u64) -> io::Result<()>11 pub fn fcntl_rdadvise<Fd: AsFd>(fd: Fd, offset: u64, len: u64) -> io::Result<()> {
12 backend::fs::syscalls::fcntl_rdadvise(fd.as_fd(), offset, len)
13 }
14
15 /// `fcntl(fd, F_FULLFSYNC)`
16 ///
17 /// # References
18 /// - [Apple]
19 ///
20 /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fcntl.2.html
21 #[inline]
fcntl_fullfsync<Fd: AsFd>(fd: Fd) -> io::Result<()>22 pub fn fcntl_fullfsync<Fd: AsFd>(fd: Fd) -> io::Result<()> {
23 backend::fs::syscalls::fcntl_fullfsync(fd.as_fd())
24 }
25