2012-03-02 Kees Cook <keescook@chromium.org>
[glibc.git] / include / signal.h
blobc43f2abeecaa3ae15d94a4624ea0f31592d90276
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>
7 # ifndef _ISOMAC
8 libc_hidden_proto (sigemptyset)
9 libc_hidden_proto (sigfillset)
10 libc_hidden_proto (sigaddset)
11 libc_hidden_proto (sigdelset)
12 libc_hidden_proto (sigismember)
13 libc_hidden_proto (__sigpause)
14 libc_hidden_proto (raise)
15 libc_hidden_proto (__libc_current_sigrtmin)
16 libc_hidden_proto (__libc_current_sigrtmax)
18 /* Now define the internal interfaces. */
19 extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
20 extern int __kill (__pid_t __pid, int __sig);
21 extern int __sigaction (int __sig, const struct sigaction *__restrict __act,
22 struct sigaction *__restrict __oact);
23 libc_hidden_proto (__sigaction)
24 extern int __sigblock (int __mask);
25 extern int __sigsetmask (int __mask);
26 extern int __sigprocmask (int __how,
27 const sigset_t *__set, sigset_t *__oset);
28 extern int __sigsuspend (const sigset_t *__set);
29 libc_hidden_proto (__sigsuspend)
30 #ifndef NO_CANCELLATION
31 extern int __sigsuspend_nocancel (const sigset_t *__set) attribute_hidden;
32 #endif
33 extern int __sigwait (const sigset_t *__set, int *__sig);
34 libc_hidden_proto (__sigwait)
35 extern int __sigwaitinfo (const sigset_t *__set, siginfo_t *__info);
36 libc_hidden_proto (__sigwaitinfo)
37 extern int __sigtimedwait (const sigset_t *__set, siginfo_t *__info,
38 const struct timespec *__timeout);
39 libc_hidden_proto (__sigtimedwait)
40 extern int __sigqueue (__pid_t __pid, int __sig,
41 const union sigval __val);
42 extern int __sigvec (int __sig, const struct sigvec *__vec,
43 struct sigvec *__ovec);
44 extern int __sigreturn (struct sigcontext *__scp);
45 extern int __sigaltstack (const struct sigaltstack *__ss,
46 struct sigaltstack *__oss);
47 extern int __libc_sigaction (int sig, const struct sigaction *act,
48 struct sigaction *oact);
49 libc_hidden_proto (__libc_sigaction)
51 extern int __sigpause (int sig_or_mask, int is_sig);
52 extern int __default_sigpause (int mask);
53 extern int __xpg_sigpause (int sig);
55 /* Simplified sigemptyset() implementation without the parameter checking. */
56 #undef __sigemptyset
57 #define __sigemptyset(ss) (__builtin_memset (ss, '\0', sizeof (sigset_t)), 0)
60 /* Allocate real-time signal with highest/lowest available priority. */
61 extern int __libc_allocate_rtsig (int __high);
62 # endif
63 #endif
64 #endif