pthread_create.3: SYNOPSIS: Use 'restrict' in prototypes

Both POSIX and glibc use 'restrict' in pthread_create().
Let's use it here too.

.../glibc$ grep_glibc_prototype pthread_create
sysdeps/htl/pthread.h:212:
extern int pthread_create (pthread_t *__restrict __threadp,
			   __const pthread_attr_t *__restrict __attr,
			   void *(*__start_routine)(void *),
			   void *__restrict __arg) __THROWNL __nonnull ((1, 3));
sysdeps/nptl/pthread.h:200:
extern int pthread_create (pthread_t *__restrict __newthread,
			   const pthread_attr_t *__restrict __attr,
			   void *(*__start_routine) (void *),
			   void *__restrict __arg) __THROWNL __nonnull ((1, 3));
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-03-08 19:53:15 +01:00 committed by Michael Kerrisk
parent 5a00663af2
commit 71f5a50a03
1 changed files with 4 additions and 2 deletions

View File

@ -30,8 +30,10 @@ pthread_create \- create a new thread
.nf
.B #include <pthread.h>
.PP
.BI "int pthread_create(pthread_t *" thread ", const pthread_attr_t *" attr ,
.BI " void *(*" start_routine ")(void *), void *" arg );
.BI "int pthread_create(pthread_t *restrict " thread ,
.BI " const pthread_attr_t *restrict " attr ,
.BI " void *(*" start_routine ")(void *),"
.BI " void *restrict " arg );
.fi
.PP
Compile and link with \fI\-pthread\fP.