Skip to content

Add schedule params & priority pthread functions #611

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

Merged
merged 5 commits into from
Jun 13, 2017

Conversation

iddm
Copy link
Contributor

@iddm iddm commented Jun 9, 2017

Fixes #609. Provides bindings to pthread_getschedparam, pthread_setschedparam and pthread_setschedprio functions.

P.S. My first PR in such a project.
P.P.S. libc-test crashed at building stage with a lot of errors, so I hope travis will do a check.
P.P.P.S. These functions are tested to work on Linux (Ubuntu 14.04) with my own crate. I will release it next week, it provides ability to control thread schedule policies and priorities.

@iddm iddm force-pushed the add-pthread-priority-functions branch from 505bef7 to cb03e62 Compare June 9, 2017 15:21
@iddm
Copy link
Contributor Author

iddm commented Jun 9, 2017

I see the problem but will provide a fix only next week...

@alexcrichton
Copy link
Member

Looks good to me! I'll r+ once CI is green

@iddm
Copy link
Contributor Author

iddm commented Jun 13, 2017

As from what I have found in the Google setschedprio is not available at osx, bsd and android.
Also, I have filled an issue with my libc-test crate failures.

@iddm iddm force-pushed the add-pthread-priority-functions branch from e0db052 to 192a245 Compare June 13, 2017 10:55
@iddm iddm force-pushed the add-pthread-priority-functions branch from c645bc1 to a75fef0 Compare June 13, 2017 10:56
@iddm
Copy link
Contributor Author

iddm commented Jun 13, 2017

@alexcrichton even though this was compiled successfully I am still not sure did I find the correct place for it or not. It seems each system decides own rules how to follow POSIX :/ But from what I have seen I think pthread_setschedprio is linux-only function.

@alexcrichton
Copy link
Member

Ok this seems good for now regardless, thanks for the PR!

@bors: r+

@bors
Copy link
Contributor

bors commented Jun 13, 2017

📌 Commit fbec8eb has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jun 13, 2017

⌛ Testing commit fbec8eb with merge c25d657...

bors added a commit that referenced this pull request Jun 13, 2017
…ichton

Add schedule params & priority pthread functions

Fixes #609. Provides bindings to `pthread_getschedparam`, `pthread_setschedparam` and `pthread_setschedprio` functions.

P.S. My first PR in such a project.
P.P.S. `libc-test` crashed at building stage with a lot of errors, so I hope `travis` will do a check.
P.P.P.S. These functions are tested to work on Linux (Ubuntu 14.04) with my own crate. I will release it next week, it provides ability to control thread schedule policies and priorities.
@iddm
Copy link
Contributor Author

iddm commented Jun 13, 2017

@alexcrichton I see that bors takes the whole first message here as a commit message. I think it should be changed, am I right?

@bors
Copy link
Contributor

bors commented Jun 13, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing c25d657 to master...

@bors bors merged commit fbec8eb into rust-lang:master Jun 13, 2017
@alexcrichton
Copy link
Member

Ah no worries!

@iddm iddm deleted the add-pthread-priority-functions branch June 14, 2017 07:28
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