diff --git a/src/runtime/driver/op/mod.rs b/src/runtime/driver/op/mod.rs index 5d90daaf..a03cc08f 100644 --- a/src/runtime/driver/op/mod.rs +++ b/src/runtime/driver/op/mod.rs @@ -4,6 +4,7 @@ use std::marker::PhantomData; use std::pin::Pin; use std::task::{Context, Poll, Waker}; +use io_uring::squeue::Flags; use io_uring::{cqueue, squeue}; mod slab_list; @@ -60,6 +61,16 @@ impl> UnsubmittedOneshot { InFlightOneshot { inner: Some(inner) } } + + /// Set flags on unsubmitted entry + /// + /// # Safety + /// + /// Flags can change logic of operation. Use it only if you now what flags do + pub unsafe fn set_flags(mut self, flags: Flags) -> Self { + self.sqe = self.sqe.flags(flags); + self + } } /// An in-progress oneshot operation which can be polled for completion.