View | Details | Raw Unified | Return to bug 27489
Collapse All | Expand All

(-)lib/libc/gen/sysconf.c (+4 lines)
Lines 284-289 Link Here
284
		mib[1] = CTL_P1003_1B_TIMER_MAX;
284
		mib[1] = CTL_P1003_1B_TIMER_MAX;
285
		goto yesno;
285
		goto yesno;
286
#endif /* _P1003_1B_VISIBLE */
286
#endif /* _P1003_1B_VISIBLE */
287
	case  _SC_NPROCESSORS_CONF:
288
		mib[0] = CTL_HW;
289
		mib[1] = HW_NCPU;
290
		goto yesno;
287
291
288
yesno:		if (sysctl(mib, 2, &value, &len, NULL, 0) == -1)
292
yesno:		if (sysctl(mib, 2, &value, &len, NULL, 0) == -1)
289
			return (-1);
293
			return (-1);
(-)lib/libc/gen/sysconf.3 (+2 lines)
Lines 151-156 Link Here
151
.It Li _SC_2_UPE
151
.It Li _SC_2_UPE
152
Return 1 if the system supports the User Portability Utilities Option,
152
Return 1 if the system supports the User Portability Utilities Option,
153
otherwise \-1.
153
otherwise \-1.
154
.It Li _SC_NPROCESSORS_CONF
155
Returns the number of processors in the system.
154
.El
156
.El
155
.Sh RETURN VALUES
157
.Sh RETURN VALUES
156
If the call to
158
If the call to
(-)sys/sys/unistd.h (+2 lines)
Lines 190-195 Link Here
190
#define _SC_SEM_VALUE_MAX	50
190
#define _SC_SEM_VALUE_MAX	50
191
#define _SC_SIGQUEUE_MAX	51
191
#define _SC_SIGQUEUE_MAX	51
192
#define _SC_TIMER_MAX		52
192
#define _SC_TIMER_MAX		52
193
#define _SC_NPROCESSORS_CONF	53
194
193
195
194
/* POSIX.1B pathconf and fpathconf options */
196
/* POSIX.1B pathconf and fpathconf options */
195
#define _PC_ASYNC_IO		53
197
#define _PC_ASYNC_IO		53

Return to bug 27489