@@ -25,6 +25,8 @@ pub type wchar_t = ::c_int;
25
25
pub type nfds_t = :: c_ulong ;
26
26
pub type projid_t = :: c_int ;
27
27
pub type zoneid_t = :: c_int ;
28
+ pub type psetid_t = :: c_int ;
29
+ pub type processorid_t = :: c_int ;
28
30
29
31
pub type suseconds_t = :: c_long ;
30
32
pub type off_t = :: c_long ;
@@ -988,6 +990,9 @@ pub const FILENAME_MAX: ::c_uint = 1024;
988
990
pub const L_tmpnam : :: c_uint = 25 ;
989
991
pub const TMP_MAX : :: c_uint = 17576 ;
990
992
993
+ pub const GRND_NONBLOCK : :: c_int = 0x0001 ;
994
+ pub const GRND_RANDOM : :: c_int = 0x0002 ;
995
+
991
996
pub const O_RDONLY : :: c_int = 0 ;
992
997
pub const O_WRONLY : :: c_int = 1 ;
993
998
pub const O_RDWR : :: c_int = 2 ;
@@ -1112,6 +1117,15 @@ pub const P_CTID: idtype_t = 13;
1112
1117
pub const P_CPUID : idtype_t = 14 ;
1113
1118
pub const P_PSETID : idtype_t = 15 ;
1114
1119
1120
+ pub const PS_NONE : :: c_int = -1 ;
1121
+ pub const PS_QUERY : :: c_int = -2 ;
1122
+ pub const PS_MYID : :: c_int = -3 ;
1123
+ pub const PS_SOFT : :: c_int = -4 ;
1124
+ pub const PS_HARD : :: c_int = -5 ;
1125
+ pub const PS_QUERY_TIME : :: c_int = -6 ;
1126
+ pub const PS_SYSTEM : :: c_int = 1 ;
1127
+ pub const PS_PRIVATE : :: c_int = 2 ;
1128
+
1115
1129
pub const UTIME_OMIT : c_long = -2 ;
1116
1130
pub const UTIME_NOW : c_long = -1 ;
1117
1131
@@ -2227,6 +2241,8 @@ extern "C" {
2227
2241
pub fn labs ( i : :: c_long ) -> :: c_long ;
2228
2242
pub fn rand ( ) -> :: c_int ;
2229
2243
pub fn srand ( seed : :: c_uint ) ;
2244
+ pub fn getentropy ( buf : * mut :: c_void , buflen : :: size_t ) -> :: c_int ;
2245
+ pub fn getrandom ( bbuf : * mut :: c_void , buflen : :: size_t , flags : :: c_uint ) -> :: ssize_t ;
2230
2246
2231
2247
pub fn gettimeofday ( tp : * mut :: timeval , tz : * mut :: c_void ) -> :: c_int ;
2232
2248
pub fn settimeofday ( tp : * const :: timeval , tz : * const :: c_void ) -> :: c_int ;
@@ -2607,6 +2623,25 @@ extern "C" {
2607
2623
pub fn ucred_getpflags ( ucred : * const ucred_t , flags : :: c_uint ) -> :: c_uint ;
2608
2624
2609
2625
pub fn ucred_size ( ) -> :: size_t ;
2626
+
2627
+ pub fn pset_create ( newpset : * mut :: psetid_t ) -> :: c_int ;
2628
+ pub fn pset_destroy ( pset : :: psetid_t ) -> :: c_int ;
2629
+ pub fn pset_assign ( pset : :: psetid_t , cpu : :: processorid_t , opset : * mut psetid_t ) -> :: c_int ;
2630
+ pub fn pset_info (
2631
+ pset : :: psetid_t ,
2632
+ tpe : * mut :: c_int ,
2633
+ numcpus : * mut :: c_uint ,
2634
+ cpulist : * mut processorid_t ,
2635
+ ) -> :: c_int ;
2636
+ pub fn pset_bind (
2637
+ pset : :: psetid_t ,
2638
+ idtype : :: idtype_t ,
2639
+ id : :: id_t ,
2640
+ opset : * mut psetid_t ,
2641
+ ) -> :: c_int ;
2642
+ pub fn pset_list ( pset : * mut psetid_t , numpsets : * mut :: c_uint ) -> :: c_int ;
2643
+ pub fn pset_setattr ( pset : psetid_t , attr : :: c_uint ) -> :: c_int ;
2644
+ pub fn pset_getattr ( pset : psetid_t , attr : * mut :: c_uint ) -> :: c_int ;
2610
2645
}
2611
2646
2612
2647
mod compat;
0 commit comments