Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding iocb data for io_submit syscall for linux/glibc. #3486

Merged
merged 1 commit into from Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions libc-test/build.rs
Expand Up @@ -3406,6 +3406,7 @@ fn test_linux(target: &str) {
headers! {
cfg:
"asm/mman.h",
[gnu]: "linux/aio_abi.h",
"linux/can.h",
"linux/can/raw.h",
// FIXME: requires kernel headers >= 5.4.1.
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-gnu.txt
Expand Up @@ -638,6 +638,7 @@ glob64
glob64_t
globfree
globfree64
iocb
lio_listio
mallinfo
mallinfo2
Expand Down
22 changes: 22 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -3,6 +3,7 @@ pub type __priority_which_t = ::c_uint;
pub type __rlimit_resource_t = ::c_uint;
pub type Lmid_t = ::c_long;
pub type regoff_t = ::c_int;
pub type __kernel_rwf_t = ::c_int;

cfg_if! {
if #[cfg(doc)] {
Expand Down Expand Up @@ -432,6 +433,27 @@ s! {
pub len: ::__u32,
pub options: ::__u32,
}

pub struct iocb {
pub aio_data: ::__u64,
#[cfg(target_endian = "little")]
pub aio_key: ::__u32,
#[cfg(target_endian = "little")]
pub aio_rw_flags: ::__kernel_rwf_t,
#[cfg(target_endian = "big")]
pub aio_rw_flags: ::__kernel_rwf_t,
#[cfg(target_endian = "big")]
pub aio_key: ::__u32,
pub aio_lio_opcode: ::__u16,
pub aio_reqprio: ::__s16,
pub aio_fildes: ::__u32,
pub aio_buf: ::__u64,
pub aio_nbytes: ::__u64,
pub aio_offset: ::__s64,
aio_reserved2: ::__u64,
pub aio_flags: ::__u32,
pub aio_resfd: ::__u32,
}
}

impl siginfo_t {
Expand Down