linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Rasmus Villemoes <rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 08/24] pthread_attr_set*.3: Constify parameters
Date: Thu, 22 May 2014 08:47:36 +0200	[thread overview]
Message-ID: <537D9D88.2010908@gmail.com> (raw)
In-Reply-To: <1400684275-20972-9-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>

Thanks, Rasmus. Applied.

Cheers,

Michael


On 05/21/2014 04:57 PM, Rasmus Villemoes wrote:
> Each of the pthread_attr_get* functions extract some piece of
> information from a pthread_attr_t, which is passed by const
> reference. Add the const keyword to the prototypes of these functions:
> 
> pthread_attr_getaffinity_np
> pthread_attr_getdetachstate
> pthread_attr_getguardsize
> pthread_attr_getinheritsched
> pthread_attr_getschedparam
> pthread_attr_getschedpolicy
> pthread_attr_getscope
> pthread_attr_getstack
> pthread_attr_getstackaddr
> pthread_attr_getstacksize
> 
> Signed-off-by: Rasmus Villemoes <rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
> ---
>  man3/pthread_attr_setaffinity_np.3  | 2 +-
>  man3/pthread_attr_setdetachstate.3  | 2 +-
>  man3/pthread_attr_setguardsize.3    | 2 +-
>  man3/pthread_attr_setinheritsched.3 | 2 +-
>  man3/pthread_attr_setschedparam.3   | 2 +-
>  man3/pthread_attr_setschedpolicy.3  | 2 +-
>  man3/pthread_attr_setscope.3        | 2 +-
>  man3/pthread_attr_setstack.3        | 2 +-
>  man3/pthread_attr_setstackaddr.3    | 2 +-
>  man3/pthread_attr_setstacksize.3    | 2 +-
>  10 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/man3/pthread_attr_setaffinity_np.3 b/man3/pthread_attr_setaffinity_np.3
> index e99cc58..4ae27d8 100644
> --- a/man3/pthread_attr_setaffinity_np.3
> +++ b/man3/pthread_attr_setaffinity_np.3
> @@ -34,7 +34,7 @@ CPU affinity attribute in thread attributes object
>  
>  .BI "int pthread_attr_setaffinity_np(pthread_attr_t *" attr ,
>  .BI "                   size_t " cpusetsize ", const cpu_set_t *" cpuset );
> -.BI "int pthread_attr_getaffinity_np(pthread_attr_t *" attr ,
> +.BI "int pthread_attr_getaffinity_np(const pthread_attr_t *" attr ,
>  .BI "                   size_t " cpusetsize ", cpu_set_t *" cpuset );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setdetachstate.3 b/man3/pthread_attr_setdetachstate.3
> index dd43608..7e2f7ee 100644
> --- a/man3/pthread_attr_setdetachstate.3
> +++ b/man3/pthread_attr_setdetachstate.3
> @@ -33,7 +33,7 @@ set/get detach state attribute in thread attributes object
>  
>  .BI "int pthread_attr_setdetachstate(pthread_attr_t *" attr \
>  ", int " detachstate );
> -.BI "int pthread_attr_getdetachstate(pthread_attr_t *" attr \
> +.BI "int pthread_attr_getdetachstate(const pthread_attr_t *" attr \
>  ", int *" detachstate );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setguardsize.3 b/man3/pthread_attr_setguardsize.3
> index 801aae9..ca06b42 100644
> --- a/man3/pthread_attr_setguardsize.3
> +++ b/man3/pthread_attr_setguardsize.3
> @@ -33,7 +33,7 @@ attribute in thread attributes object
>  
>  .BI "int pthread_attr_setguardsize(pthread_attr_t *" attr \
>  ", size_t " guardsize );
> -.BI "int pthread_attr_getguardsize(pthread_attr_t *" attr \
> +.BI "int pthread_attr_getguardsize(const pthread_attr_t *" attr \
>  ", size_t *" guardsize );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setinheritsched.3 b/man3/pthread_attr_setinheritsched.3
> index a3e0e28..0f041f5 100644
> --- a/man3/pthread_attr_setinheritsched.3
> +++ b/man3/pthread_attr_setinheritsched.3
> @@ -33,7 +33,7 @@ inherit-scheduler attribute in thread attributes object
>  
>  .BI "int pthread_attr_setinheritsched(pthread_attr_t *" attr ,
>  .BI "                                 int " inheritsched );
> -.BI "int pthread_attr_getinheritsched(pthread_attr_t *" attr ,
> +.BI "int pthread_attr_getinheritsched(const pthread_attr_t *" attr ,
>  .BI "                                 int *" inheritsched );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setschedparam.3 b/man3/pthread_attr_setschedparam.3
> index 9a478e8..c2f0506 100644
> --- a/man3/pthread_attr_setschedparam.3
> +++ b/man3/pthread_attr_setschedparam.3
> @@ -33,7 +33,7 @@ scheduling parameter attributes in thread attributes object
>  
>  .BI "int pthread_attr_setschedparam(pthread_attr_t *" attr ,
>  .BI "                               const struct sched_param *" param );
> -.BI "int pthread_attr_getschedparam(pthread_attr_t *" attr ,
> +.BI "int pthread_attr_getschedparam(const pthread_attr_t *" attr ,
>  .BI "                               struct sched_param *" param );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setschedpolicy.3 b/man3/pthread_attr_setschedpolicy.3
> index 84b508a..59fe053 100644
> --- a/man3/pthread_attr_setschedpolicy.3
> +++ b/man3/pthread_attr_setschedpolicy.3
> @@ -33,7 +33,7 @@ scheduling policy attribute in thread attributes object
>  
>  .BI "int pthread_attr_setschedpolicy(pthread_attr_t *" attr \
>  ", int " policy );
> -.BI "int pthread_attr_getschedpolicy(pthread_attr_t *" attr \
> +.BI "int pthread_attr_getschedpolicy(const pthread_attr_t *" attr \
>  ", int " *policy );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setscope.3 b/man3/pthread_attr_setscope.3
> index 2effe6b..837b105 100644
> --- a/man3/pthread_attr_setscope.3
> +++ b/man3/pthread_attr_setscope.3
> @@ -33,7 +33,7 @@ attribute in thread attributes object
>  
>  .BI "int pthread_attr_setscope(pthread_attr_t *" attr \
>  ", int " scope );
> -.BI "int pthread_attr_getscope(pthread_attr_t *" attr \
> +.BI "int pthread_attr_getscope(const pthread_attr_t *" attr \
>  ", int *" scope );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setstack.3 b/man3/pthread_attr_setstack.3
> index e6ebb9f..66fd1ba 100644
> --- a/man3/pthread_attr_setstack.3
> +++ b/man3/pthread_attr_setstack.3
> @@ -33,7 +33,7 @@ attributes in thread attributes object
>  
>  .BI "int pthread_attr_setstack(pthread_attr_t *" attr ,
>  .BI "                          void *" stackaddr ", size_t " stacksize );
> -.BI "int pthread_attr_getstack(pthread_attr_t *" attr ,
> +.BI "int pthread_attr_getstack(const pthread_attr_t *" attr ,
>  .BI "                          void **" stackaddr ", size_t *" stacksize );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setstackaddr.3 b/man3/pthread_attr_setstackaddr.3
> index 15331ca..e4d78ee 100644
> --- a/man3/pthread_attr_setstackaddr.3
> +++ b/man3/pthread_attr_setstackaddr.3
> @@ -33,7 +33,7 @@ set/get stack address attribute in thread attributes object
>  
>  .BI "int pthread_attr_setstackaddr(pthread_attr_t *" attr \
>  ", void *" stackaddr );
> -.BI "int pthread_attr_getstackaddr(pthread_attr_t *" attr \
> +.BI "int pthread_attr_getstackaddr(const pthread_attr_t *" attr \
>  ", void **" stackaddr );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> diff --git a/man3/pthread_attr_setstacksize.3 b/man3/pthread_attr_setstacksize.3
> index 95a9b4f..06e7c54 100644
> --- a/man3/pthread_attr_setstacksize.3
> +++ b/man3/pthread_attr_setstacksize.3
> @@ -33,7 +33,7 @@ attribute in thread attributes object
>  
>  .BI "int pthread_attr_setstacksize(pthread_attr_t *" attr \
>  ", size_t " stacksize );
> -.BI "int pthread_attr_getstacksize(pthread_attr_t *" attr \
> +.BI "int pthread_attr_getstacksize(const pthread_attr_t *" attr \
>  ", size_t *" stacksize );
>  .sp
>  Compile and link with \fI\-pthread\fP.
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-05-22  6:47 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 14:57 [PATCH 00/24] Yet more prototype fixes Rasmus Villemoes
     [not found] ` <1400684275-20972-1-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 14:57   ` [PATCH 01/24] inet.3: Fix prototype Rasmus Villemoes
     [not found]     ` <1400684275-20972-2-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 17:44       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 02/24] makecontext.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-3-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 17:45       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 03/24] makedev.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-4-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 17:46       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 04/24] malloc_trim.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-5-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 17:47       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 05/24] mq_getattr.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-6-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 17:49       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 06/24] perror.3: Fix declaration Rasmus Villemoes
     [not found]     ` <1400684275-20972-7-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 17:50       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 07/24] pthread_sigqueue.3: Include needed header Rasmus Villemoes
     [not found]     ` <1400684275-20972-8-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 17:56       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 08/24] pthread_attr_set*.3: Constify parameters Rasmus Villemoes
     [not found]     ` <1400684275-20972-9-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-22  6:47       ` Michael Kerrisk (man-pages) [this message]
2014-05-21 14:57   ` [PATCH 09/24] pthread_cleanup_push_defer_np.3: Mention feature test macro Rasmus Villemoes
     [not found]     ` <1400684275-20972-10-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:06       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 10/24] pthread_setname_np.3: Fix prototype Rasmus Villemoes
     [not found]     ` <1400684275-20972-11-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:07       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 11/24] pthread_setschedparam.3: Fix prototypes Rasmus Villemoes
     [not found]     ` <1400684275-20972-12-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:08       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 12/24] pthread_setschedprio.3: Fix prototype Rasmus Villemoes
     [not found]     ` <1400684275-20972-13-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:08       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 13/24] rcmd.3: Fix prototypes Rasmus Villemoes
     [not found]     ` <1400684275-20972-14-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:09       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 14/24] re_comp.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-15-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:10       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 15/24] rexec.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-16-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:10       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 16/24] rtime.3: Replace header Rasmus Villemoes
     [not found]     ` <1400684275-20972-17-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:14       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 17/24] resolver.3: Fix prototypes and extern-declaration Rasmus Villemoes
     [not found]     ` <1400684275-20972-18-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:31       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 18/24] scandir.3: Fix prototypes Rasmus Villemoes
     [not found]     ` <1400684275-20972-19-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:40       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 19/24] sigvec.3: Fix prototype Rasmus Villemoes
     [not found]     ` <1400684275-20972-20-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:15       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 20/24] setnetgrent.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-21-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:15       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 21/24] tsearch.3: " Rasmus Villemoes
     [not found]     ` <1400684275-20972-22-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:48       ` Michael Kerrisk (man-pages)
     [not found]         ` <537CF50D.2080400-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-21 20:02           ` Rasmus Villemoes
     [not found]             ` <87oayqew8p.fsf-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 20:15               ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 22/24] getauxval.3: Fix permissions Rasmus Villemoes
     [not found]     ` <1400684275-20972-23-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:17       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 23/24] key_setsecret.3: Fix prototypes Rasmus Villemoes
     [not found]     ` <1400684275-20972-24-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:19       ` Michael Kerrisk (man-pages)
2014-05-21 14:57   ` [PATCH 24/24] xdr.3: tfix Rasmus Villemoes
     [not found]     ` <1400684275-20972-25-git-send-email-rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2014-05-21 18:17       ` Michael Kerrisk (man-pages)
2014-05-21 18:13   ` [PATCH 00/24] Yet more prototype fixes Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537D9D88.2010908@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rv-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).