Skip to content

Commit

Permalink
Replace IOSEQ_.._BIT with the flag equivalent (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Licenser authored Feb 8, 2020
1 parent 4c6baca commit aae2fb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/io_uring/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ pub const IORING_OP_SEND: u8 = 26;
pub const IORING_OP_RECV: u8 = 27;
pub const IORING_OP_OPENAT2: u8 = 28;
pub const IORING_OP_LAST: u8 = 29;
pub const IOSQE_FIXED_FILE_BIT: u8 = 0;
pub const IOSQE_IO_DRAIN_BIT: u8 = 1;
pub const IOSQE_IO_LINK_BIT: u8 = 2;
pub const IOSQE_IO_HARDLINK_BIT: u8 = 3;
pub const IOSQE_ASYNC_BIT: u8 = 4;
pub const IOSQE_PERSONALITY_BIT: u8 = 5;
pub const IOSQE_FIXED_FILE: u8 = 1;
pub const IOSQE_IO_DRAIN: u8 = 2;
pub const IOSQE_IO_LINK: u8 = 4;
pub const IOSQE_IO_HARDLINK: u8 = 8;
pub const IOSQE_ASYNC: u8 = 16;
pub const IOSQE_PERSONALITY: u8 = 32;
pub const IORING_SETUP_IOPOLL: u32 = 1;
pub const IORING_SETUP_SQPOLL: u32 = 2;
pub const IORING_SETUP_SQ_AFF: u32 = 4;
Expand Down
4 changes: 2 additions & 2 deletions src/io_uring/kernel_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ impl io_uring_sqe {
match ordering {
Ordering::None => {}
Ordering::Link => {
self.flags |= IOSQE_IO_LINK_BIT
self.flags |= IOSQE_IO_LINK
}
Ordering::Drain => {
self.flags |= IOSQE_IO_DRAIN_BIT
self.flags |= IOSQE_IO_DRAIN
}
}
}
Expand Down

0 comments on commit aae2fb6

Please sign in to comment.