Skip to content

Commit

Permalink
refactor(driver): better IORING_CQE_F_MORE handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherlock-Holo committed Jul 1, 2024
1 parent d75b76e commit 4b5795b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compio-driver/src/iour/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ cfg_if::cfg_if! {
}
}
use io_uring::{
cqueue::more,
opcode::{AsyncCancel, PollAdd},
types::{Fd, SubmitArgs, Timespec},
IoUring,
Expand Down Expand Up @@ -152,9 +153,8 @@ impl Driver {
let completed_entries = cqueue.filter_map(|entry| match entry.user_data() {
Self::CANCEL => None,
Self::NOTIFY => {
const IORING_CQE_F_MORE: u32 = 1 << 1;
let flags = entry.flags();
debug_assert!(flags & IORING_CQE_F_MORE == IORING_CQE_F_MORE);
debug_assert!(more(flags));
self.notifier.clear().expect("cannot clear notifier");
None
}
Expand Down

0 comments on commit 4b5795b

Please sign in to comment.