Skip to content

Commit

Permalink
Add IORING_MSG_RING_FLAGS_PASS. (#1034)
Browse files Browse the repository at this point in the history
And, implement `Default` for `io_uring_sync_cancel_reg`.
  • Loading branch information
sunfishcode committed Mar 19, 2024
1 parent 4c3335c commit 966fde1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/io_uring.rs
Expand Up @@ -632,6 +632,9 @@ bitflags::bitflags! {
/// `IORING_MSG_RING_CQE_SKIP`
const CQE_SKIP = sys::IORING_MSG_RING_CQE_SKIP;

/// `IORING_MSG_RING_FLAGS_PASS`
const FLAGS_PASS = sys::IORING_MSG_RING_FLAGS_PASS;

/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
const _ = !0;
}
Expand Down Expand Up @@ -1159,6 +1162,22 @@ pub struct io_uring_sync_cancel_reg {
pub pad: [u64; 4],
}

impl Default for io_uring_sync_cancel_reg {
#[inline]
fn default() -> Self {
Self {
addr: Default::default(),
fd: Default::default(),
flags: Default::default(),
timeout: Timespec {
tv_sec: 0,
tv_nsec: 0,
},
pad: Default::default(),
}
}
}

/// An io_uring Completion Queue Entry.
///
/// This does not derive `Copy` or `Clone` because the `big_cqe` field is not
Expand Down

0 comments on commit 966fde1

Please sign in to comment.