select.2: SYNOPSIS: Use 'restrict' in prototypes

POSIX specifies that the parameters of [p]select()
shall be 'restrict'.  Glibc uses 'restrict' too.
Let's use it here too.

......

.../glibc$ grep_glibc_prototype select
misc/sys/select.h:101:
extern int select (int __nfds, fd_set *__restrict __readfds,
		   fd_set *__restrict __writefds,
		   fd_set *__restrict __exceptfds,
		   struct timeval *__restrict __timeout);
.../glibc$ grep_glibc_prototype pselect
misc/sys/select.h:113:
extern int pselect (int __nfds, fd_set *__restrict __readfds,
		    fd_set *__restrict __writefds,
		    fd_set *__restrict __exceptfds,
		    const struct timespec *__restrict __timeout,
		    const __sigset_t *__restrict __sigmask);
.../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-02-14 00:10:16 +01:00 committed by Michael Kerrisk
parent 04dc013d9b
commit 6b032bf01e
1 changed files with 7 additions and 5 deletions

View File

@ -45,17 +45,19 @@ synchronous I/O multiplexing
.nf
.B #include <sys/select.h>
.PP
.BI "int select(int " nfds ", fd_set *" readfds ", fd_set *" writefds ,
.BI " fd_set *" exceptfds ", struct timeval *" timeout );
.BI "int select(int " nfds ", fd_set *restrict " readfds ,
.BI " fd_set *restrict " writefds ", fd_set *restrict " exceptfds ,
.BI " struct timeval *restrict " timeout );
.PP
.BI "void FD_CLR(int " fd ", fd_set *" set );
.BI "int FD_ISSET(int " fd ", fd_set *" set );
.BI "void FD_SET(int " fd ", fd_set *" set );
.BI "void FD_ZERO(fd_set *" set );
.PP
.BI "int pselect(int " nfds ", fd_set *" readfds ", fd_set *" writefds ,
.BI " fd_set *" exceptfds ", const struct timespec *" timeout ,
.BI " const sigset_t *" sigmask );
.BI "int pselect(int " nfds ", fd_set *restrict " readfds ,
.BI " fd_set *restrict " writefds ", fd_set *restrict " exceptfds ,
.BI " const struct timespec *restrict " timeout ,
.BI " const sigset_t *restrict " sigmask );
.fi
.PP
.RS -4