1.\" 2.\" This file and its contents are supplied under the terms of the 3.\" Common Development and Distribution License ("CDDL"), version 1.0. 4.\" You may only use this file in accordance with the terms of version 5.\" 1.0 of the CDDL. 6.\" 7.\" A full copy of the text of the CDDL should have accompanied this 8.\" source. A copy of the CDDL is also available via the Internet at 9.\" http://www.illumos.org/license/CDDL. 10.\" 11.\" 12.\" Copyright (c) 2014 Joyent, Inc. 13.\" 14.Dd "Dec 21, 2014" 15.Dt GET_NPROCS 3C 16.Os 17.Sh NAME 18.Nm get_nprocs , 19.Nm get_nprocs_conf 20.Nd get number of processors 21.Sh SYNOPSIS 22.In unistd.h 23.Ft int 24.Fo get_nprocs 25.Fa void 26.Fc 27.Ft int 28.Fo get_nprocs_conf 29.Fa void 30.Fc 31.Sh DESCRIPTION 32The 33.Fn get_nprocs 34and 35.Fn get_nprocs_conf 36functions are provided for compatibility with other systems and are 37equivalent to calling 38.Fn sysconf _SC_NPROCESSORS_ONLN 39and 40.Fn sysconf _SC_NPROCESSORS_CONF 41respectively. 42.Sh RETURN VALUES 43The 44.Fn get_nprocs 45function returns the number of processors that are currently online. The 46.Fn get_nprocs_conf 47function returns the number of processors that the operating system has 48configured. 49.Sh INTERFACE STABILITY 50.Sy Committed . 51.Sh MT-LEVEL 52.Sy MT-Safe , 53.Sy Async-Signal-Safe 54.Sh SEE ALSO 55.Xr psrinfo 1M , 56.Xr processor_info 2 , 57.Xr sysconf 3C , 58.Xr attributes 5 , 59.Xr standards 5 60