1use crate::{backend, io}; 2use 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] 11pub 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] 22pub fn fcntl_fullfsync<Fd: AsFd>(fd: Fd) -> io::Result<()> { 23 backend::fs::syscalls::fcntl_fullfsync(fd.as_fd()) 24} 25