diff options
Diffstat (limited to 'usr/src/man/man3c')
-rw-r--r-- | usr/src/man/man3c/Makefile | 4 | ||||
-rw-r--r-- | usr/src/man/man3c/get_nprocs.3c | 59 |
2 files changed, 63 insertions, 0 deletions
diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile index 7fe87e9bee..2e6ebee2a1 100644 --- a/usr/src/man/man3c/Makefile +++ b/usr/src/man/man3c/Makefile @@ -161,6 +161,7 @@ MANFILES= __fbufsize.3c \ getlogin.3c \ getmntent.3c \ getnetgrent.3c \ + get_nprocs.3c \ getopt.3c \ getpagesize.3c \ getpagesizes.3c \ @@ -788,6 +789,7 @@ MANLINKS= FD_CLR.3c \ getlogin_r.3c \ getmntany.3c \ getnetgrent_r.3c \ + get_nprocs_conf.3c \ getpassphrase.3c \ getpwent.3c \ getpwent_r.3c \ @@ -1665,6 +1667,8 @@ getnetgrent_r.3c := LINKSRC = getnetgrent.3c innetgr.3c := LINKSRC = getnetgrent.3c setnetgrent.3c := LINKSRC = getnetgrent.3c +get_nprocs_conf.3c := LINKSRC = get_nprocs.3c + getpassphrase.3c := LINKSRC = getpass.3c setpriority.3c := LINKSRC = getpriority.3c diff --git a/usr/src/man/man3c/get_nprocs.3c b/usr/src/man/man3c/get_nprocs.3c new file mode 100644 index 0000000000..4d73833b56 --- /dev/null +++ b/usr/src/man/man3c/get_nprocs.3c @@ -0,0 +1,59 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright (c) 2014 Joyent, Inc. +.\" +.Dd "Dec 21, 2014" +.Dt GET_NPROCS 3C +.Os +.Sh NAME +.Nm get_nprocs , +.Nm get_nprocs_conf +.Nd get number of processors +.Sh SYNOPSIS +.In unistd.h +.Ft int +.Fo get_nprocs +.Fa void +.Fc +.Ft int +.Fo get_nprocs_conf +.Fa void +.Fc +.Sh DESCRIPTION +The +.Fn get_nprocs +and +.Fn get_nprocs_conf +functions are provided for compatibility with other systems and are +equivalent to calling +.Fn sysconf _SC_NPROCESSORS_ONLN +and +.Fn sysconf _SC_NPROCESSORS_CONF +respectively. +.Sh RETURN VALUES +The +.Fn get_nprocs +function returns the number of processors that are currently online. The +.Fn get_nprocs_conf +function returns the number of processors that the operating system has +configured. +.Sh INTERFACE STABILITY +.Sy Committed . +.Sh MT-LEVEL +.Sy MT-Safe , +.Sy Async-Signal-Safe +.Sh SEE ALSO +.Xr psrinfo 1M , +.Xr processor_info 2 , +.Xr sysconf 3C , +.Xr attributes 5 , +.Xr standards 5 |