Skip to content

Commit b29e815

Browse files
authored
relax sq.flags atomic read (#282)
Change the atomic read of the SQ flags field to be `relaxed`. Refer to discussions in #197 and in particular, as pointed out in #197, refer to the liburing library loads of this same field. The liburing library names this field sq.kflags and all its atomic loads are performed with their IO_URING_READ_ONCE macro, which it defines to be the `relaxed` atomic load.
1 parent 4e52bca commit b29e815

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/submit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<'a> Submitter<'a> {
6666
/// CQ ring is overflown
6767
fn sq_cq_overflow(&self) -> bool {
6868
unsafe {
69-
(*self.sq_flags).load(atomic::Ordering::Acquire) & sys::IORING_SQ_CQ_OVERFLOW != 0
69+
(*self.sq_flags).load(atomic::Ordering::Relaxed) & sys::IORING_SQ_CQ_OVERFLOW != 0
7070
}
7171
}
7272

0 commit comments

Comments
 (0)