diff mbox series

[06/23] pthread_create.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210308185331.242176-7-alx.manpages@gmail.com
State New
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 4) | expand

Commit Message

Alejandro Colomar March 8, 2021, 6:53 p.m. UTC
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>
---
 man3/pthread_create.3 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
index a1ede6e96..14fd37220 100644
--- a/man3/pthread_create.3
+++ b/man3/pthread_create.3
@@ -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.