From d2b9ba291ef0d1dc8807b6d46996674c723924d0 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Sun, 21 Dec 2014 23:44:00 +0000 Subject: [PATCH] 5475 Need manuals for get_nprocs() and get_nprocs_conf() Reviewed by: Jerry Jelinek Approved by: Richard Lowe --- usr/src/man/man3c/Makefile | 4 ++ usr/src/man/man3c/get_nprocs.3c | 59 ++++++++++++++++++++++++++ usr/src/man/man3lib/libc.3lib | 1 + usr/src/pkg/manifests/system-library.man3c.inc | 2 + 4 files changed, 66 insertions(+) create mode 100644 usr/src/man/man3c/get_nprocs.3c 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 diff --git a/usr/src/man/man3lib/libc.3lib b/usr/src/man/man3lib/libc.3lib index a976fb256c..793e3d56e6 100644 --- a/usr/src/man/man3lib/libc.3lib +++ b/usr/src/man/man3lib/libc.3lib @@ -290,6 +290,7 @@ l l . \fBgetloadavg\fR \fBgetlogin\fR \fBgetlogin_r\fR \fBgetmntany\fR \fBgetmntent\fR \fBgetmsg\fR +\fBget_nprocs\fR \fBget_nprocs_conf\fR \fBgetnetgrent\fR \fBgetnetgrent_r\fR \fBgetopt\fR \fBgetopt_clip\fR \fBgetopt_long\fR \fBgetopt_long_only\fR diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc index 5fcd5a0bbb..6214caccf7 100644 --- a/usr/src/pkg/manifests/system-library.man3c.inc +++ b/usr/src/pkg/manifests/system-library.man3c.inc @@ -157,6 +157,7 @@ file path=usr/share/man/man3c/getloadavg.3c file path=usr/share/man/man3c/getlogin.3c file path=usr/share/man/man3c/getmntent.3c file path=usr/share/man/man3c/getnetgrent.3c +file path=usr/share/man/man3c/get_nprocs.3c file path=usr/share/man/man3c/getopt.3c file path=usr/share/man/man3c/getpagesize.3c file path=usr/share/man/man3c/getpagesizes.3c @@ -789,6 +790,7 @@ link path=usr/share/man/man3c/gethrvtime.3c target=gethrtime.3c link path=usr/share/man/man3c/getlogin_r.3c target=getlogin.3c link path=usr/share/man/man3c/getmntany.3c target=getmntent.3c link path=usr/share/man/man3c/getnetgrent_r.3c target=getnetgrent.3c +link path=usr/share/man/man3c/get_nprocs_conf.3c target=get_nprocs.3c link path=usr/share/man/man3c/getpassphrase.3c target=getpass.3c link path=usr/share/man/man3c/getpwent.3c target=getpwnam.3c link path=usr/share/man/man3c/getpwent_r.3c target=getpwnam.3c -- 2.11.4.GIT