#ifndef _SIGNAL_H
#if !defined __need_sig_atomic_t && !defined __need_sigset_t
# define _SIGNAL_H
#endif
#include
__BEGIN_DECLS
#include
#if defined __need_sig_atomic_t || defined _SIGNAL_H
# ifndef __sig_atomic_t_defined
# define __sig_atomic_t_defined
__BEGIN_NAMESPACE_STD
typedef __sig_atomic_t sig_atomic_t;
__END_NAMESPACE_STD
# endif
# undef __need_sig_atomic_t
#endif
#if defined __need_sigset_t || (defined _SIGNAL_H && defined __USE_POSIX)
# ifndef __sigset_t_defined
# define __sigset_t_defined
typedef __sigset_t sigset_t;
# endif
# undef __need_sigset_t
#endif
#ifdef _SIGNAL_H
#include
#include
#if defined __USE_XOPEN || defined __USE_XOPEN2K
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
#endif
#ifdef __USE_XOPEN
# endif
# ifndef __uid_t_defined
typedef __uid_t uid_t;
# define __uid_t_defined
# endif
#endif
typedef void (*__sighandler_t) (int);
extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
__THROW;
#ifdef __USE_GNU
extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
__THROW;
#endif
__BEGIN_NAMESPACE_STD
#ifdef __USE_BSD
extern __sighandler_t signal (int __sig, __sighandler_t __handler)
__THROW;
#else
# ifdef __REDIRECT_NTH
extern __sighandler_t __REDIRECT_NTH (signal,
(int __sig, __sighandler_t __handler),
__sysv_signal);
# else
# define signal __sysv_signal
# endif
#endif
__END_NAMESPACE_STD
#ifdef __USE_XOPEN
extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
__THROW;
#endif
#ifdef __USE_POSIX
extern int kill (__pid_t __pid, int __sig) __THROW;
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int killpg (__pid_t __pgrp, int __sig) __THROW;
#endif
__BEGIN_NAMESPACE_STD
extern int raise (int __sig) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_SVID
extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
__THROW;
extern int gsignal (int __sig) __THROW;
#endif
#ifdef __USE_MISC
extern void psignal (int __sig, __const char *__s);
#endif
extern int __sigpause (int __sig_or_mask, int __is_sig);
#ifdef __FAVOR_BSD
extern int sigpause (int __mask) __THROW __attribute_deprecated__;
#else
# ifdef __USE_XOPEN
# ifdef __GNUC__
extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
# else
# define sigpause(sig) __sigpause ((sig), 1)
# endif
# endif
#endif
#ifdef __USE_BSD
# define sigmask(sig) __sigmask(sig)
extern int sigblock (int __mask) __THROW __attribute_deprecated__;
extern int sigsetmask (int __mask) __THROW __attribute_deprecated__;
extern int siggetmask (void) __THROW __attribute_deprecated__;
#endif
#ifdef __USE_MISC
# define NSIG _NSIG
#endif
#ifdef __USE_GNU
typedef __sighandler_t sighandler_t;
#endif
#ifdef __USE_BSD
typedef __sighandler_t sig_t;
#endif
#ifdef __USE_POSIX
# ifdef __USE_POSIX199309
# define __need_timespec
# include
# include
# endif
extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1));
extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1));
extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
extern int sigdelset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
extern int sigismember (__const sigset_t *__set, int __signo)
__THROW __nonnull ((1));
# ifdef __USE_GNU
extern int sigisemptyset (__const sigset_t *__set) __THROW __nonnull ((1));
extern int sigandset (sigset_t *__set, __const sigset_t *__left,
__const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
extern int sigorset (sigset_t *__set, __const sigset_t *__left,
__const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
# endif
# include
extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
sigset_t *__restrict __oset) __THROW;
extern int sigsuspend (__const sigset_t *__set) __nonnull ((1));
extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__restrict __oact) __THROW;
extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
__nonnull ((1, 2));
# ifdef __USE_POSIX199309
extern int sigwaitinfo (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info) __nonnull ((1));
extern int sigtimedwait (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info,
__const struct timespec *__restrict __timeout)
__nonnull ((1));
extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
__THROW;
# endif
#endif
#ifdef __USE_BSD
extern __const char *__const _sys_siglist[_NSIG];
extern __const char *__const sys_siglist[_NSIG];
struct sigvec
{
__sighandler_t sv_handler;
int sv_mask;
int sv_flags;
# define sv_onstack sv_flags
};
# define SV_ONSTACK (1 << 0)
# define SV_INTERRUPT (1 << 1)
# define SV_RESETHAND (1 << 2)
extern int sigvec (int __sig, __const struct sigvec *__vec,
struct sigvec *__ovec) __THROW;
# include
extern int sigreturn (struct sigcontext *__scp) __THROW;
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int siginterrupt (int __sig, int __interrupt) __THROW;
# include
# ifdef __USE_XOPEN
# include
# endif
extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
__THROW __attribute_deprecated__;
extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
struct sigaltstack *__restrict __oss) __THROW;
#endif
#ifdef __USE_XOPEN_EXTENDED
extern int sighold (int __sig) __THROW;
extern int sigrelse (int __sig) __THROW;
extern int sigignore (int __sig) __THROW;
extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;
#endif
#if defined __USE_POSIX199506 || defined __USE_UNIX98
# include
# include
#endif
extern int __libc_current_sigrtmin (void) __THROW;
extern int __libc_current_sigrtmax (void) __THROW;
#endif
__END_DECLS
#endif
|