Add the 'restrict' type qualifier to the prototypes of `sigaction',
`sigprocmask', `sigaltstack', and `sigwait' as well as to the prototypes of the apparantly unimplemented functions `sigtimedwait' and `sigwaitinfo'. This complies with IEEE Std 1003.1-2001.
This commit is contained in:
parent
54beeb39c2
commit
e31d11c36a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104368
@ -54,30 +54,31 @@ __BEGIN_DECLS
|
|||||||
int raise(int);
|
int raise(int);
|
||||||
#ifndef _ANSI_SOURCE
|
#ifndef _ANSI_SOURCE
|
||||||
int kill(__pid_t, int);
|
int kill(__pid_t, int);
|
||||||
int sigaction(int, const struct sigaction *, struct sigaction *);
|
int sigaction(int, const struct sigaction * __restrict,
|
||||||
|
struct sigaction * __restrict);
|
||||||
int sigaddset(sigset_t *, int);
|
int sigaddset(sigset_t *, int);
|
||||||
int sigdelset(sigset_t *, int);
|
int sigdelset(sigset_t *, int);
|
||||||
int sigemptyset(sigset_t *);
|
int sigemptyset(sigset_t *);
|
||||||
int sigfillset(sigset_t *);
|
int sigfillset(sigset_t *);
|
||||||
int sigismember(const sigset_t *, int);
|
int sigismember(const sigset_t *, int);
|
||||||
int sigpending(sigset_t *);
|
int sigpending(sigset_t *);
|
||||||
int sigprocmask(int, const sigset_t *, sigset_t *);
|
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
|
||||||
int sigsuspend(const sigset_t *);
|
int sigsuspend(const sigset_t *);
|
||||||
int sigwait(const sigset_t *, int *);
|
int sigwait(const sigset_t *, int *);
|
||||||
|
|
||||||
|
|
||||||
#ifdef _P1003_1B_VISIBLE
|
#ifdef _P1003_1B_VISIBLE
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int sigqueue(__pid_t, int, const union sigval);
|
int sigqueue(__pid_t, int, const union sigval);
|
||||||
int sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *);
|
int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict,
|
||||||
int sigwaitinfo(const sigset_t *, siginfo_t *);
|
const struct timespec * __restrict);
|
||||||
|
int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef _POSIX_SOURCE
|
#ifndef _POSIX_SOURCE
|
||||||
int killpg(__pid_t, int);
|
int killpg(__pid_t, int);
|
||||||
int sigaltstack(const stack_t *, stack_t *);
|
int sigaltstack(const stack_t * __restrict, stack_t * __restrict);
|
||||||
int sigblock(int);
|
int sigblock(int);
|
||||||
int siginterrupt(int, int);
|
int siginterrupt(int, int);
|
||||||
int sigpause(int);
|
int sigpause(int);
|
||||||
|
@ -57,7 +57,10 @@ struct sigaction {
|
|||||||
#define sa_sigaction __sigaction_u.__sa_sigaction
|
#define sa_sigaction __sigaction_u.__sa_sigaction
|
||||||
.Ed
|
.Ed
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn sigaction "int sig" "const struct sigaction *act" "struct sigaction *oact"
|
.Fo sigaction
|
||||||
|
.Fa "int sig" "const struct sigaction * restrict act"
|
||||||
|
.Fa "struct sigaction * restrict oact"
|
||||||
|
.Fc
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The system defines a set of signals that may be delivered to a process.
|
The system defines a set of signals that may be delivered to a process.
|
||||||
Signal delivery resembles the occurrence of a hardware interrupt:
|
Signal delivery resembles the occurrence of a hardware interrupt:
|
||||||
|
@ -50,7 +50,7 @@ typedef struct sigaltstack {
|
|||||||
} stack_t;
|
} stack_t;
|
||||||
.Ed
|
.Ed
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn sigaltstack "const stack_t *ss" "stack_t *oss"
|
.Fn sigaltstack "const stack_t * restrict ss" "stack_t * restrict oss"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Fn Sigaltstack
|
.Fn Sigaltstack
|
||||||
allows users to define an alternate stack on which signals
|
allows users to define an alternate stack on which signals
|
||||||
|
@ -43,7 +43,9 @@
|
|||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In signal.h
|
.In signal.h
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn sigprocmask "int how" "const sigset_t *set" "sigset_t *oset"
|
.Fo sigprocmask
|
||||||
|
.Fa "int how" "const sigset_t * restrict set" "sigset_t * restrict oset"
|
||||||
|
.Fc
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Fn sigprocmask
|
.Fn sigprocmask
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In signal.h
|
.In signal.h
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn sigwait "const sigset_t *set" "int *sig"
|
.Fn sigwait "const sigset_t * restrict set" "int * restrict sig"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Fn sigwait
|
.Fn sigwait
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In signal.h
|
.In signal.h
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn sigwait "const sigset_t *set" "int *sig"
|
.Fn sigwait "const sigset_t * restrict set" "int * restrict sig"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Fn sigwait
|
.Fn sigwait
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
__weak_reference(_sigwait, sigwait);
|
__weak_reference(_sigwait, sigwait);
|
||||||
|
|
||||||
int
|
int
|
||||||
_sigwait(const sigset_t *set, int *sig)
|
_sigwait(const sigset_t * __restrict set, int * __restrict sig)
|
||||||
{
|
{
|
||||||
struct pthread *curthread = _get_curthread();
|
struct pthread *curthread = _get_curthread();
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
__weak_reference(_sigwait, sigwait);
|
__weak_reference(_sigwait, sigwait);
|
||||||
|
|
||||||
int
|
int
|
||||||
_sigwait(const sigset_t *set, int *sig)
|
_sigwait(const sigset_t * __restrict set, int * __restrict sig)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In signal.h
|
.In signal.h
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn sigwait "const sigset_t *set" "int *sig"
|
.Fn sigwait "const sigset_t * restrict set" "int * restrict sig"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Fn sigwait
|
.Fn sigwait
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
__weak_reference(_sigwait, sigwait);
|
__weak_reference(_sigwait, sigwait);
|
||||||
|
|
||||||
int
|
int
|
||||||
_sigwait(const sigset_t *set, int *sig)
|
_sigwait(const sigset_t * __restrict set, int * __restrict sig)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user