Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout: add support for completion_count in timeout call #79

Closed
wants to merge 2 commits into from

Conversation

bikallem
Copy link
Contributor

@bikallem bikallem commented Aug 29, 2022

This PR adds support for specifying 'completion (cqe) count' when issuing timeout sqe to uring. By specifying completion_count, timeout sqe returns 0 - success - when the specified number of completion_count cqes complete.

The parameter is an optional type with default value of 0 to make it backwards compatible with earlier release.

I have also made a performance improvement to set_timespec c stub function by reducing the need to allocate int64.

submit_timeout c stub is also implemented in 2 c stubs since it has exceeded 5 parameters limit of OCaml stub functions.

@bikallem bikallem requested review from talex5 and haesbaert August 29, 2022 11:23
Add more tests to demonstrate the use of `completion_count` parameter.
Fix the int -> intnat in c stubs.
@haesbaert
Copy link
Contributor

haesbaert commented Sep 8, 2022

I don't get why intnat completion_count, what's wrong with v_completion_count and Int_val(v_completion_count) ?
Also, I'd condense v_clock and v_absolute int a v_flags which is a list for each bit, that saves the extra parameter and you don't need the native/byte stuff.
The rest of the code is not breaking line on the function arguments so I wouldn't as well.
(edited: because of the pornographic amount of typos)

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.

3 participants