diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:25 +0000 |
commit | 5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch) | |
tree | 35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /vendor/rustix/src/io_uring.rs | |
parent | Adding debian version 1.66.0+dfsg1-1. (diff) | |
download | rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip |
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/io_uring.rs')
-rw-r--r-- | vendor/rustix/src/io_uring.rs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/vendor/rustix/src/io_uring.rs b/vendor/rustix/src/io_uring.rs index 13f3bbd10..2f67107ba 100644 --- a/vendor/rustix/src/io_uring.rs +++ b/vendor/rustix/src/io_uring.rs @@ -19,9 +19,8 @@ //! [io_uring]: https://en.wikipedia.org/wiki/Io_uring #![allow(unsafe_code)] -use crate::fd::{AsFd, BorrowedFd, RawFd}; -use crate::imp; -use crate::io::{self, OwnedFd}; +use crate::fd::{AsFd, BorrowedFd, OwnedFd, RawFd}; +use crate::{backend, io}; use core::ffi::c_void; use core::ptr::null_mut; use linux_raw_sys::general as sys; @@ -35,7 +34,7 @@ use linux_raw_sys::general as sys; /// [Linux]: https://man.archlinux.org/man/io_uring_setup.2.en #[inline] pub fn io_uring_setup(entries: u32, params: &mut io_uring_params) -> io::Result<OwnedFd> { - imp::io_uring::syscalls::io_uring_setup(entries, params) + backend::io_uring::syscalls::io_uring_setup(entries, params) } /// `io_uring_register(fd, opcode, arg, nr_args)`—Register files or user @@ -58,7 +57,7 @@ pub unsafe fn io_uring_register<Fd: AsFd>( arg: *const c_void, nr_args: u32, ) -> io::Result<()> { - imp::io_uring::syscalls::io_uring_register(fd.as_fd(), opcode, arg, nr_args) + backend::io_uring::syscalls::io_uring_register(fd.as_fd(), opcode, arg, nr_args) } /// `io_uring_enter(fd, to_submit, min_complete, flags, arg, size)`—Initiate @@ -83,7 +82,14 @@ pub unsafe fn io_uring_enter<Fd: AsFd>( arg: *const c_void, size: usize, ) -> io::Result<u32> { - imp::io_uring::syscalls::io_uring_enter(fd.as_fd(), to_submit, min_complete, flags, arg, size) + backend::io_uring::syscalls::io_uring_enter( + fd.as_fd(), + to_submit, + min_complete, + flags, + arg, + size, + ) } bitflags::bitflags! { @@ -545,7 +551,6 @@ pub const IORING_OFF_SQES: u64 = sys::IORING_OFF_SQES as _; /// `IORING_REGISTER_FILES_SKIP` #[inline] #[doc(alias = "IORING_REGISTER_FILES_SKIP")] -#[allow(unsafe_code)] pub const fn io_uring_register_files_skip() -> BorrowedFd<'static> { let files_skip = sys::IORING_REGISTER_FILES_SKIP as RawFd; |