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

The sched_param structure and pthread functions arent't available for OpenBSD #2721

Closed
iddm opened this issue Mar 11, 2022 · 1 comment · Fixed by #2733
Closed

The sched_param structure and pthread functions arent't available for OpenBSD #2721

iddm opened this issue Mar 11, 2022 · 1 comment · Fixed by #2733
Labels
C-bug Category: bug

Comments

@iddm
Copy link
Contributor

iddm commented Mar 11, 2022

MCVE

fn main() {
    let param = libc::sched_param;
    println!("{}", param.sched_priority);
}

Gives

error[E0412]: cannot find type `sched_param` in crate `libc`

Target OS: OpenBSD.

The struct, as well as functions necessary for thread schedule management, should be available in OpenBSD as well as they are for NetBSD and FreeBSD. This also goes for pthread_getschedparam and pthread_setschedparam, and, probably, __errno_location.

The documentation of libc crate for OpenBSD doesn't even have a mention of those.

Linking the issue in thread-priority: iddm/thread-priority#19

If there is an agreement, I can provide a PR myself, just want a confirmation here.

@iddm iddm added the C-bug Category: bug label Mar 11, 2022
@iddm iddm changed the title The sched_param structure isn't available for OpenBSD The sched_param structure and pthread functions arent't available for OpenBSD Mar 11, 2022
@devnexen
Copy link
Contributor

feel free to make a PR I would say, note that sched_param and related functions exist already for netbsd and ought to be shared between those two as much as possible.

bors added a commit that referenced this issue Mar 27, 2022
Expose more thread bindings for BSD-like OSes.

Fixes #2721
@bors bors closed this as completed in 02bdb0a Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants