File tree Expand file tree Collapse file tree 6 files changed +12
-0
lines changed Expand file tree Collapse file tree 6 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -697,6 +697,8 @@ pub const FD_SETSIZE: usize = 1024;
697697
698698pub const ST_NOSUID : :: c_ulong = 2 ;
699699
700+ pub const HW_AVAILCPU : :: c_int = 25 ;
701+
700702extern {
701703 pub fn mincore ( addr : * const :: c_void , len : :: size_t ,
702704 vec : * mut :: c_char ) -> :: c_int ;
Original file line number Diff line number Diff line change @@ -543,6 +543,8 @@ pub const FD_SETSIZE: usize = 1024;
543543
544544pub const ST_NOSUID : :: c_ulong = 2 ;
545545
546+ pub const HW_AVAILCPU : :: c_int = 25 ;
547+
546548extern {
547549 pub fn mincore ( addr : * const :: c_void , len : :: size_t ,
548550 vec : * mut c_char ) -> :: c_int ;
Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ pub const ST_RDONLY: ::c_ulong = 1;
9898
9999pub const NI_MAXHOST : :: socklen_t = 1025 ;
100100
101+ pub const CTL_HW : :: c_int = 6 ;
102+ pub const HW_NCPU : :: c_int = 3 ;
103+
101104f ! {
102105 pub fn FD_CLR ( fd: :: c_int, set: * mut fd_set) -> ( ) {
103106 let fd = fd as usize ;
Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
205205pub const PTHREAD_RWLOCK_INITIALIZER : pthread_rwlock_t = 0 as * mut _ ;
206206pub const PTHREAD_MUTEX_RECURSIVE : :: c_int = 2 ;
207207
208+ pub const HW_AVAILCPU : :: c_int = 25 ;
209+
208210extern {
209211 pub fn mprotect ( addr : * const :: c_void , len : :: size_t , prot : :: c_int )
210212 -> :: c_int ;
Original file line number Diff line number Diff line change @@ -208,6 +208,8 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
208208pub const PTHREAD_RWLOCK_INITIALIZER : pthread_rwlock_t = 0 as * mut _ ;
209209pub const PTHREAD_MUTEX_RECURSIVE : :: c_int = 2 ;
210210
211+ pub const HW_AVAILCPU : :: c_int = 25 ;
212+
211213extern {
212214 pub fn mprotect ( addr : * const :: c_void , len : :: size_t , prot : :: c_int )
213215 -> :: c_int ;
Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82;
163163pub const _SC_THREAD_PRIO_INHERIT: :: c_int = 83 ;
164164pub const _SC_THREAD_PRIO_PROTECT: :: c_int = 84 ;
165165pub const _SC_THREAD_SAFE_FUNCTIONS: :: c_int = 85 ;
166+ pub const _SC_NPROCESSORS_ONLN: :: c_int = 97 ;
166167
167168pub const PTHREAD_STACK_MIN : :: size_t = 8192 ;
168169pub const PTHREAD_MUTEX_INITIALIZER : pthread_mutex_t = pthread_mutex_t {
You can’t perform that action at this time.
0 commit comments