Skip to content

Commit f9073f4

Browse files
committed
Merge pull request #157 from dhuseby/fixing_bsd_ncpu
Fixes #156
2 parents 5f545a8 + e95c53d commit f9073f4

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed

src/unix/bsd/freebsdlike/dragonfly.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ pub const KERN_PROC_PATHNAME: ::c_int = 9;
66
pub const SIGSTKSZ: ::size_t = 40960;
77
pub const MADV_INVAL: ::c_int = 10;
88

9-
pub const HW_AVAILCPU: ::c_int = 25;
10-
119
extern {
1210
pub fn __dfly_error() -> *const ::c_int;
1311
}

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
363363
pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
364364
pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
365365
pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
366+
pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
366367
pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
367368
pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
368369
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;

src/unix/bsd/openbsdlike/bitrig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
155155
pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
156156
pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
157157
pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
158+
pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
158159
pub const _SC_THREADS : ::c_int = 91;
159160
pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
160161
pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;
@@ -212,7 +213,6 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
212213
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
213214
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
214215

215-
pub const HW_AVAILCPU: ::c_int = 25;
216216
pub const KERN_PROC_ARGS: ::c_int = 55;
217217

218218
pub const TMP_MAX : ::c_uint = 0x7fffffff;

src/unix/bsd/openbsdlike/netbsd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
238238
pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
239239
pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
240240
pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
241+
pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
241242
pub const _SC_THREADS : ::c_int = 41;
242243
pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
243244
pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;

src/unix/bsd/openbsdlike/openbsd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
159159
pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
160160
pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
161161
pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
162+
pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
162163
pub const _SC_THREADS : ::c_int = 91;
163164
pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
164165
pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;

0 commit comments

Comments
 (0)