1#ifndef _SIGNAL_H
2#if defined __need_sig_atomic_t || defined __need_sigset_t
3# include <signal/signal.h>
4#else
5# include <signal/signal.h>
6
7# ifndef _ISOMAC
8libc_hidden_proto (sigemptyset)
9libc_hidden_proto (sigfillset)
10libc_hidden_proto (sigaddset)
11libc_hidden_proto (sigdelset)
12libc_hidden_proto (sigismember)
13extern int __sigpause (int sig_or_mask, int is_sig);
14libc_hidden_proto (__sigpause)
15libc_hidden_proto (raise)
16libc_hidden_proto (__libc_current_sigrtmin)
17libc_hidden_proto (__libc_current_sigrtmax)
18libc_hidden_proto (_sys_siglist)
19
20/* Now define the internal interfaces. */
21extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
22extern int __kill (__pid_t __pid, int __sig);
23extern int __sigaction (int __sig, const struct sigaction *__restrict __act,
24 struct sigaction *__restrict __oact);
25libc_hidden_proto (__sigaction)
26extern int __sigblock (int __mask);
27extern int __sigsetmask (int __mask);
28extern int __sigprocmask (int __how,
29 const sigset_t *__set, sigset_t *__oset);
30extern int __sigsuspend (const sigset_t *__set);
31libc_hidden_proto (__sigsuspend)
32#ifndef NO_CANCELLATION
33extern int __sigsuspend_nocancel (const sigset_t *__set) attribute_hidden;
34#endif
35extern int __sigwait (const sigset_t *__set, int *__sig);
36libc_hidden_proto (__sigwait)
37extern int __sigwaitinfo (const sigset_t *__set, siginfo_t *__info);
38libc_hidden_proto (__sigwaitinfo)
39extern int __sigtimedwait (const sigset_t *__set, siginfo_t *__info,
40 const struct timespec *__timeout);
41libc_hidden_proto (__sigtimedwait)
42extern int __sigqueue (__pid_t __pid, int __sig,
43 const union sigval __val);
44#ifdef __USE_MISC
45extern int __sigreturn (struct sigcontext *__scp);
46#endif
47extern int __sigaltstack (const struct sigaltstack *__ss,
48 struct sigaltstack *__oss);
49extern int __libc_sigaction (int sig, const struct sigaction *act,
50 struct sigaction *oact);
51libc_hidden_proto (__libc_sigaction)
52
53extern int __default_sigpause (int mask);
54extern int __xpg_sigpause (int sig);
55
56/* Simplified sigemptyset() implementation without the parameter checking. */
57#undef __sigemptyset
58#define __sigemptyset(ss) \
59 ({ __builtin_memset (ss, '\0', sizeof (sigset_t)); 0; })
60
61
62/* Allocate real-time signal with highest/lowest available priority. */
63extern int __libc_allocate_rtsig (int __high);
64
65# if IS_IN (rtld)
66extern __typeof (__sigaction) __sigaction attribute_hidden;
67extern __typeof (__libc_sigaction) __libc_sigaction attribute_hidden;
68# endif
69# endif
70#endif
71#endif
72