Skip to content

Conversation

@sugarraysam
Copy link
Contributor

Addressing another issue uncovered in #363.

Flags are required to issue custom io_uring_enter syscalls:

    pub fn wait_cqes_timeout(&self, min_complete: u32, timeout: Duration) -> Result<usize> {
        let opts = flags::IORING_ENTER_EXT_ARG | flags::IORING_ENTER_GETEVENTS; <-- sys was private

        let ts = types::Timespec::from(timeout);
        let args = types::SubmitArgs::new().timespec(&ts);

        unsafe {
            self.ring
                .submitter()
                .enter(0, to_complete, opts, Some(&args.args))
        }
    }

@quininer
Copy link
Member

I don't think this is a good export, please refer to the exist flag wrapping.

@sugarraysam sugarraysam changed the title Re-export sys flags under public flags module. Expose io_uring_enter flags using bitflags! macro. Sep 24, 2025
@sugarraysam
Copy link
Contributor Author

I don't think this is a good export, please refer to the exist flag wrapping.

Ahh my bad I missed this bitflags! macro setup. Fixed !

@quininer quininer merged commit 1880f3b into tokio-rs:master Sep 25, 2025
17 checks passed
@quininer
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants