Re: [patch] Add get_nprocs.3 and get_nprocs_conf.3 manpages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Petr,

Thanks for this patch. Could I ask you to resubmit, with the following changes:

* Combine the two functions into one page, get_nprocs.3
* Create a link file get_nprocs_conf.3

In addition, would you be willing to submit this page under either the
Verbatim license or GPLv2 (the former is my preference). I ask this
because no pages so far are licensed under GPLv3, and I'd like to
minimize the range of licenses used in the man-pages project.

Thanks,

Michael

On Sun, Feb 19, 2012 at 3:56 AM, Beňas Petr <xbenas00@xxxxxxxxxxxxxxxxx> wrote:
> Greetings,
>
> I have created $subj manpages (both undocumented.3).
> Patch against latest git manpages version, information obtained from [1],
> [2] and testing on two x86_64 hosts.
>
> Best regards
> Petr Benas
>
> [1]
> http://www.gnu.org/software/libc/manual/html_node/Processor-Resources.html
> [2] http://sourceware.org/ml/libc-hacker/2004-03/msg00088.html
>
> diff --git a/man3/get_nprocs.3 b/man3/get_nprocs.3
> new file mode 100644
> index 0000000..e718ae5
> --- /dev/null
> +++ b/man3/get_nprocs.3
> @@ -0,0 +1,50 @@
> +.\" Copyright (c) 2012, Petr Benas
> +.\"
> +.\" This is free documentation; you can redistribute it and/or
> +.\" modify it under the terms of the GNU General Public License as
> +.\" published by the Free Software Foundation; either version 3 of
> +.\" the License, or (at your option) any later version.
> +.\"
> +.\" The GNU General Public License's references to "object code"
> +.\" and "executables" are to be interpreted as the output of any
> +.\" document formatting or typesetting system, including
> +.\" intermediate and printed output.
> +.\"
> +.\" This manual is distributed in the hope that it will be useful,
> +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
> +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +.\" GNU General Public License for more details.
> +.\"
> +.\" You should have received a copy of the GNU General Public
> +.\" License along with this manual; if not, see
> +.\" <http://www.gnu.org/licenses/>.
> +.TH GET_NPROCS 3   2012-02-18 "GNU" "Linux Programmer's Manual"
> +.SH NAME
> +get_nprocs \- get number of processors available
> +.SH SYNOPSIS
> +.B #include <sys/sysinfo.h>
> +.sp
> +.BI "int get_nprocs(void);"
> +.SH DESCRIPTION
> +The function
> +.BR get_nprocs ()
> +returns the number of processors currently available in the system.
> +The number returned can be affected by CPU logical hotplug.
> +.SH EXAMPLE
> +Following is an example how
> +.BR get_nprocs ()
> +can be used.
> +
> +.nf
> +#include <stdio.h>
> +#include <sys/sysinfo.h>
> +
> +int main(int argc, char *argv[])
> +{
> +    printf("This sytem has %d processors available.\\n", get_nprocs());
> +    return 0;
> +}
> +.fi
> +.SH "SEE ALSO"
> +.BR get_nprocs_conf (3)
> +
> diff --git a/man3/get_nprocs_conf.3 b/man3/get_nprocs_conf.3
> new file mode 100644
> index 0000000..990ca51
> --- /dev/null
> +++ b/man3/get_nprocs_conf.3
> @@ -0,0 +1,50 @@
> +.\" Copyright (c) 2012, Petr Benas
> +.\"
> +.\" This is free documentation; you can redistribute it and/or
> +.\" modify it under the terms of the GNU General Public License as
> +.\" published by the Free Software Foundation; either version 3 of
> +.\" the License, or (at your option) any later version.
> +.\"
> +.\" The GNU General Public License's references to "object code"
> +.\" and "executables" are to be interpreted as the output of any
> +.\" document formatting or typesetting system, including
> +.\" intermediate and printed output.
> +.\"
> +.\" This manual is distributed in the hope that it will be useful,
> +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
> +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +.\" GNU General Public License for more details.
> +.\"
> +.\" You should have received a copy of the GNU General Public
> +.\" License along with this manual; if not, see
> +.\" <http://www.gnu.org/licenses/>.
> +.TH GET_NPROCS_CONF 3   2012-02-18 "GNU" "Linux Programmer's Manual"
> +.SH NAME
> +get_nprocs_conf \- get number of processors configured by the operating
> system
> +.SH SYNOPSIS
> +.B #include <sys/sysinfo.h>
> +.sp
> +.BI "int get_nprocs_conf(void);"
> +.SH DESCRIPTION
> +The function
> +.BR get_nprocs_conf ()
> +returns the number of processors configured by the operating system.
> +The number returned is not affected by CPU logical hotplug.
> +.SH EXAMPLE
> +Following is an example how
> +.BR get_nprocs_conf ()
> +can be used.
> +
> +.nf
> +#include <stdio.h>
> +#include <sys/sysinfo.h>
> +
> +int main(int argc, char *argv[])
> +{
> +    printf("This sytem has %d processors configured.\\n",
> get_nprocs_conf());
> +    return 0;
> +}
> +.fi
> +.SH "SEE ALSO"
> +.BR get_nprocs (3)
> +
>
>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux