Re: [PATCH] pthread_attr_setschedparam.3: SYNOPSIS: Use 'restrict' in prototypes

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

 



Hi Alex,

On 5/10/21 9:39 AM, Alejandro Colomar wrote:
> Both POSIX and glibc use 'restrict' in
> pthread_attr_getschedparam(), pthread_attr_setschedparam().
> Let's use it here too.
> 
> .../glibc$ grep_glibc_prototype pthread_attr_getschedparam
> sysdeps/htl/pthread.h:102:
> extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
> 				       struct sched_param *__restrict __param)
> 	__THROW __nonnull ((1, 2));
> sysdeps/nptl/pthread.h:294:
> extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
> 				       struct sched_param *__restrict __param)
>      __THROW __nonnull ((1, 2));
> .../glibc$ grep_glibc_prototype pthread_attr_setschedparam
> sysdeps/htl/pthread.h:107:
> extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
> 				       const struct sched_param *__restrict
> 				       __param) __THROW __nonnull ((1, 2));
> sysdeps/nptl/pthread.h:299:
> extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
> 				       const struct sched_param *__restrict
> 				       __param) __THROW __nonnull ((1, 2));
> .../glibc$
> 
> Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>

Applied. Thanks!

Cheers,

Michael

> ---
>  man3/pthread_attr_setschedparam.3 | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/man3/pthread_attr_setschedparam.3 b/man3/pthread_attr_setschedparam.3
> index adc3fbcb2..72ee0143a 100644
> --- a/man3/pthread_attr_setschedparam.3
> +++ b/man3/pthread_attr_setschedparam.3
> @@ -31,10 +31,10 @@ scheduling parameter attributes in thread attributes object
>  .nf
>  .B #include <pthread.h>
>  .PP
> -.BI "int pthread_attr_setschedparam(pthread_attr_t *" attr ,
> -.BI "                               const struct sched_param *" param );
> -.BI "int pthread_attr_getschedparam(const pthread_attr_t *" attr ,
> -.BI "                               struct sched_param *" param );
> +.BI "int pthread_attr_setschedparam(pthread_attr_t *restrict " attr ,
> +.BI "                              const struct sched_param *restrict " param );
> +.BI "int pthread_attr_getschedparam(const pthread_attr_t *restrict " attr ,
> +.BI "                              struct sched_param *restrict " param );
>  .PP
>  Compile and link with \fI\-pthread\fP.
>  .fi
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[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