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

Add support for SCHED_DEADLINE flags #15

Closed
wants to merge 3 commits into from

Conversation

FridayOrtiz
Copy link

In reference to #13, this adds support for the three flags supported by SCHED_DEADLINE.

I don't like that this changes the interface (deadline policy goes from taking 3 u64 to 3 u64 and an Option<DeadlineFlags>) and am open to alternative suggestions that are backwards-compatible.

@@ -103,6 +103,17 @@ impl RealtimeThreadSchedulePolicy {
}
}

/// Flags for controlling Deadline scheduling behavior.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also add a link to any online "man" where this is also documented? Just in case one needs more information.

unsafe {
let mut sched_attr = SchedAttr::default();
let ret = libc::syscall(
libc::SYS_sched_getattr,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have already used this syscall twice. Perhaps, there is also use of it for others in the library? Can we extract it into a unix::get_scheduling_attributes or anything like that, or whatever you think is worth doing?

@iddm
Copy link
Owner

iddm commented Jan 25, 2022

Hey @RafaelOrtizRC ! Are you going to rebase your PR and finish it so that we merge it?

@iddm
Copy link
Owner

iddm commented Mar 5, 2023

I've just finished it for you: https://crates.io/crates/thread-priority/0.13.0

@iddm iddm closed this Mar 5, 2023
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