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

add freebsd's cpusetid_t api #2887

Merged
merged 1 commit into from Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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