[PATCH 02/24] sem_wait.3: SYNOPSIS: Use 'restrict' in prototypes
Alejandro Colomar
alx.manpages@gmail.com
Wed Mar 10 18:31:28 GMT 2021
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 --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.
--
2.30.1.721.g45526154a5
More information about the Libc-alpha
mailing list