summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-23 23:40:48 +0000
committerbors <bors@rust-lang.org>2022-08-23 23:40:48 +0000
commit81b696289b6d76f25915f9ae145a90a2bbc481a6 (patch)
tree814c1da94abcef4bfce0cd32b64dfd60ae05bcb9 /src
parentf6eb4966ec94941c02298d34d8a75b4f02d066bc (diff)
parenteffb039eb18684d72553e80a09e1d2ae8cedc2f7 (diff)
downloadrust-libc-81b696289b6d76f25915f9ae145a90a2bbc481a6.tar.gz
Auto merge of #2887 - devnexen:fbsd_cpusetid_t, r=JohnTitor
add freebsd's cpusetid_t api
Diffstat (limited to 'src')
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 5c696f73bc..813bc613b1 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -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 {
@@ -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, ...)