diff mbox series

[02/24] sem_wait.3: SYNOPSIS: Use 'restrict' in prototypes

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

Commit Message

Alejandro Colomar March 10, 2021, 6:31 p.m. UTC
Both POSIX and glibc use 'restrict' in sem_timedwait().
Let's use it here too.

.../glibc$ grep_glibc_prototype sem_timedwait
sysdeps/pthread/semaphore.h:62:
extern int sem_timedwait (sem_t *__restrict __sem,
			  const struct timespec *__restrict __abstime)
  __nonnull ((1, 2));
.../glibc$

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

Patch

diff --git a/man3/sem_wait.3 b/man3/sem_wait.3
index d57b6f6ce..da7ae72c2 100644
--- a/man3/sem_wait.3
+++ b/man3/sem_wait.3
@@ -31,7 +31,8 @@  sem_wait, sem_timedwait, sem_trywait \- lock a semaphore
 .PP
 .BI "int sem_wait(sem_t *" sem );
 .BI "int sem_trywait(sem_t *" sem );
-.BI "int sem_timedwait(sem_t *" sem ", const struct timespec *" abs_timeout );
+.BI "int sem_timedwait(sem_t *restrict " sem ,
+.BI "                  const struct timespec *restrict " abs_timeout );
 .fi
 .PP
 Link with \fI\-pthread\fP.