Skip to content

Commit 1d5136a

Browse files
committed
Add pthread_set/get schedparam functions to FreeBSD.
FreeBSD has these functions and this provides an interface to use them.
1 parent 53f78cd commit 1d5136a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

libc-test/semver/freebsd.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,8 @@ pthread_rwlockattr_getpshared
17241724
pthread_rwlockattr_setpshared
17251725
pthread_setaffinity_np
17261726
pthread_set_name_np
1727+
pthread_getschedparam
1728+
pthread_setschedparam
17271729
pthread_spin_destroy
17281730
pthread_spin_init
17291731
pthread_spin_lock

src/unix/bsd/freebsdlike/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,16 @@ extern "C" {
15941594
pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int;
15951595
pub fn pthread_get_name_np(tid: ::pthread_t, name: *mut ::c_char, len: ::size_t);
15961596
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
1597+
pub fn pthread_setschedparam(
1598+
native: ::pthread_t,
1599+
policy: ::c_int,
1600+
param: *const sched_param,
1601+
) -> ::c_int;
1602+
pub fn pthread_getschedparam(
1603+
native: ::pthread_t,
1604+
policy: *mut ::c_int,
1605+
param: *mut sched_param,
1606+
) -> ::c_int;
15971607
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int) -> ::c_int;
15981608
pub fn utrace(addr: *const ::c_void, len: ::size_t) -> ::c_int;
15991609
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;

0 commit comments

Comments
 (0)