Skip to content

Commit effb039

Browse files
committed
add freebsd's cpusetid_t api
1 parent 7c04c75 commit effb039

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

libc-test/semver/freebsd.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,10 @@ clock_getres
15081508
clock_settime
15091509
cmsgcred
15101510
cmsghdr
1511+
cpuset
1512+
cpuset_getid
1513+
cpuset_setid
1514+
cpusetid_t
15111515
daemon
15121516
dallocx
15131517
devname_r

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ pub type fhandle_t = fhandle;
4444
pub type au_id_t = ::uid_t;
4545
pub type au_asid_t = ::pid_t;
4646

47+
pub type cpusetid_t = ::c_int;
48+
4749
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
4850
#[repr(u32)]
4951
pub enum devstat_support_flags {
@@ -4204,6 +4206,14 @@ extern "C" {
42044206
setsize: ::size_t,
42054207
mask: *const cpuset_t,
42064208
) -> ::c_int;
4209+
pub fn cpuset(setid: *mut ::cpusetid_t) -> ::c_int;
4210+
pub fn cpuset_getid(
4211+
level: cpulevel_t,
4212+
which: cpuwhich_t,
4213+
id: ::id_t,
4214+
setid: *mut ::cpusetid_t,
4215+
) -> ::c_int;
4216+
pub fn cpuset_setid(which: cpuwhich_t, id: ::id_t, setid: ::cpusetid_t) -> ::c_int;
42074217
pub fn cap_enter() -> ::c_int;
42084218
pub fn cap_getmode(modep: *mut ::c_uint) -> ::c_int;
42094219
pub fn __cap_rights_init(version: ::c_int, rights: *mut cap_rights_t, ...)

0 commit comments

Comments
 (0)