Skip to content

Commit a33cc18

Browse files
committed
netbsd/openbsd sched_param api addition
1 parent c95722c commit a33cc18

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libc-test/semver/netbsd.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,9 @@ regexec
12321232
regfree
12331233
regmatch_t
12341234
regoff_t
1235+
sched_getparam
1236+
sched_param
1237+
sched_setparam
12351238
secure_path
12361239
seekdir
12371240
sem

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ s! {
447447
pub af_name: [::c_char; 16],
448448
af_arg: [[::c_char; 10]; 24],
449449
}
450+
451+
pub struct sched_param {
452+
pub sched_priority: ::c_int,
453+
}
450454
}
451455

452456
s_no_extra_traits! {
@@ -2170,6 +2174,9 @@ extern "C" {
21702174
newsize: ::size_t,
21712175
flags: ::c_int,
21722176
) -> *mut ::c_void;
2177+
2178+
pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int;
2179+
pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int;
21732180
}
21742181

21752182
#[link(name = "util")]

0 commit comments

Comments
 (0)