diff mbox series

[08/23] pthread_mutexattr_getpshared.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210308185331.242176-9-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_mutexattr_getpshared().
Let's use it here too.

.../glibc$ grep_glibc_prototype pthread_mutexattr_getpshared
sysdeps/htl/pthread.h:368:
extern int pthread_mutexattr_getpshared(const pthread_mutexattr_t *__restrict __attr,
					int *__restrict __pshared)
	__THROW __nonnull ((1, 2));
sysdeps/nptl/pthread.h:830:
extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
					 __restrict __attr,
					 int *__restrict __pshared)
     __THROW __nonnull ((1, 2));
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/pthread_mutexattr_getpshared.3 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/man3/pthread_mutexattr_getpshared.3 b/man3/pthread_mutexattr_getpshared.3
index 2fd48012e..0ae3c05ea 100644
--- a/man3/pthread_mutexattr_getpshared.3
+++ b/man3/pthread_mutexattr_getpshared.3
@@ -30,10 +30,11 @@  process-shared mutex attribute
 .nf
 .B #include <pthread.h>
 .PP
-.BI "int pthread_mutexattr_getpshared(const pthread_mutexattr_t *" attr ,
-.BI "                                 int *" pshared );
+.BI "int pthread_mutexattr_getpshared("
+.BI "                              const pthread_mutexattr_t *restrict " attr ,
+.BI "                              int *restrict " pshared );
 .BI "int pthread_mutexattr_setpshared(pthread_mutexattr_t *" attr ,
-.BI "                                 int " pshared );
+.BI "                              int " pshared );
 .fi
 .PP
 Compile and link with \fI\-pthread\fP.