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