-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Expose more thread bindings for BSD-like OSes. #2733
Conversation
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
e580478
to
d70b9e4
Compare
c6d150d
to
0254cec
Compare
Is there anything I can do to let the Cirrus CI work? |
e82fed7
to
838e439
Compare
pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int; | ||
pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int; | ||
pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; | ||
pub fn sched_setscheduler(pid: ::pid_t, policy: ::c_int, param: *const sched_param) -> ::c_int; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 4 sched_*
functions aren't defined on OpenBSD. In fact, they exists in sched.h but under #if 0
. so it will not link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no! :( Thanks for noticing this. Really love that "not yet" comment there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed those.
838e439
to
bb5bfc2
Compare
@@ -2405,6 +2405,16 @@ extern "C" { | |||
size: ::size_t, | |||
set: *mut cpuset_t, | |||
) -> ::c_int; | |||
pub fn pthread_setschedparam( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I implied in your ticket, I suggest to put both these in src/unix/bsd/netbsd/mod.rs
so both systems inherit it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, I did that, but it lead to some errors. Trying once more.
other than that you can fill |
7ad58ca
to
e3fc344
Compare
pub struct sched_param { | ||
pub sched_priority: ::c_int, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the struct definition should be moved to src/unix/bsd/netbsdlike/mod.rs
, and not just removed.
else it is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am sorry, didn't push that.
e3fc344
to
4454b97
Compare
Looks ok now nice ! |
@bors r+ |
📌 Commit 4454b97 has been approved by |
Expose more thread bindings for BSD-like OSes. Fixes #2721
💔 Test failed - checks-actions |
Current error is:
Also, can I push the |
actual error is this
|
Interesting! How were you able to find it? I will fix it if there is just this one error, but I don't know how to actually check if it builds cuz I don't have an openbsd. :( |
Click on the checks-actions link from bors then scroll on the left to find the actual builder that failed. Ignore the semver builders, the result from those is currently ignored. |
4454b97
to
576f86d
Compare
@bors r+ |
📌 Commit 576f86d has been approved by |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
Thanks everyone. |
Fixes #2721