Skip to content

Commit

Permalink
Auto merge of #2887 - devnexen:fbsd_cpusetid_t, r=JohnTitor
Browse files Browse the repository at this point in the history
add freebsd's cpusetid_t api
  • Loading branch information
bors committed Aug 23, 2022
2 parents f6eb496 + effb039 commit 81b6962
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libc-test/semver/freebsd.txt
Expand Up @@ -1508,6 +1508,10 @@ clock_getres
clock_settime
cmsgcred
cmsghdr
cpuset
cpuset_getid
cpuset_setid
cpusetid_t
daemon
dallocx
devname_r
Expand Down
10 changes: 10 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -44,6 +44,8 @@ pub type fhandle_t = fhandle;
pub type au_id_t = ::uid_t;
pub type au_asid_t = ::pid_t;

pub type cpusetid_t = ::c_int;

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_support_flags {
Expand Down Expand Up @@ -4204,6 +4206,14 @@ extern "C" {
setsize: ::size_t,
mask: *const cpuset_t,
) -> ::c_int;
pub fn cpuset(setid: *mut ::cpusetid_t) -> ::c_int;
pub fn cpuset_getid(
level: cpulevel_t,
which: cpuwhich_t,
id: ::id_t,
setid: *mut ::cpusetid_t,
) -> ::c_int;
pub fn cpuset_setid(which: cpuwhich_t, id: ::id_t, setid: ::cpusetid_t) -> ::c_int;
pub fn cap_enter() -> ::c_int;
pub fn cap_getmode(modep: *mut ::c_uint) -> ::c_int;
pub fn __cap_rights_init(version: ::c_int, rights: *mut cap_rights_t, ...)
Expand Down

0 comments on commit 81b6962

Please sign in to comment.