Skip to content

Commit 4b5795b

Browse files
committed
refactor(driver): better IORING_CQE_F_MORE handle
1 parent d75b76e commit 4b5795b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compio-driver/src/iour/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ cfg_if::cfg_if! {
2020
}
2121
}
2222
use io_uring::{
23+
cqueue::more,
2324
opcode::{AsyncCancel, PollAdd},
2425
types::{Fd, SubmitArgs, Timespec},
2526
IoUring,
@@ -152,9 +153,8 @@ impl Driver {
152153
let completed_entries = cqueue.filter_map(|entry| match entry.user_data() {
153154
Self::CANCEL => None,
154155
Self::NOTIFY => {
155-
const IORING_CQE_F_MORE: u32 = 1 << 1;
156156
let flags = entry.flags();
157-
debug_assert!(flags & IORING_CQE_F_MORE == IORING_CQE_F_MORE);
157+
debug_assert!(more(flags));
158158
self.notifier.clear().expect("cannot clear notifier");
159159
None
160160
}

0 commit comments

Comments
 (0)