diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-02-03 20:43:55 +0100 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2021-02-06 21:37:34 +0100 |
commit | eaaa85c17c86b874c289cc1b8d9a48b0245f93bb (patch) | |
tree | e15a8b6fa4485a8cda6230d488417414c52dfa86 | |
parent | cb4baea939718df3726472842f29f38d58ab6677 (diff) | |
download | man-pages-eaaa85c17c86b874c289cc1b8d9a48b0245f93bb.tar.gz |
getitimer.2: Use restrict in prototypes
POSIX specifies that the 2nd and 3rd parameters to setitimer()
shall be 'restrict'. Glibc uses 'restrict' too.
Let's use it here too.
......
.../glibc$ grep_syscall_wrapper setitimer
time/sys/time.h:129:
extern int setitimer (__itimer_which_t __which,
const struct itimerval *__restrict __new,
struct itimerval *__restrict __old) __THROW;
.../glibc$
function grep_syscall_wrapper()
{
if ! [ -v 1 ]; then
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
return ${EX_USAGE};
fi
find * -type f \
|grep '\.h$' \
|sort -V \
|xargs pcregrep -Mn \
"^[^\s][\w\s]+\s+\**${1}\s*\((?s)[\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r-- | man2/getitimer.2 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man2/getitimer.2 b/man2/getitimer.2 index b435c343e6..9ec32e8360 100644 --- a/man2/getitimer.2 +++ b/man2/getitimer.2 @@ -18,8 +18,8 @@ getitimer, setitimer \- get or set value of an interval timer .B #include <sys/time.h> .PP .BI "int getitimer(int " which ", struct itimerval *" curr_value ); -.BI "int setitimer(int " which ", const struct itimerval *" new_value , -.BI " struct itimerval *" old_value ); +.BI "int setitimer(int " which ", const struct itimerval *restrict " new_value , +.BI " struct itimerval *restrict " old_value ); .fi .SH DESCRIPTION These system calls provide access to interval timers, that is, |