Blame src/api/signal.c

nsz 056b01
#include <signal.h>
nsz 056b01
#define T(t) (t*)0;
nsz 056b01
#define F(t,n) {t *y = &x.;;}
nsz 056b01
#define C(n) switch(n){case n:;}
nsz 056b01
static void f()
nsz 056b01
{
nsz 056b01
T(sig_atomic_t)
nsz 056b01
{void(*x)(int) = SIG_DFL;}
nsz 056b01
{void(*x)(int) = SIG_ERR;}
nsz 056b01
{void(*x)(int) = SIG_IGN;}
nsz 056b01
#ifdef _POSIX_C_SOURCE
nsz 056b01
{void(*x)(int) = SIG_HOLD;}
nsz 056b01
T(size_t)
nsz 056b01
T(sigset_t)
nsz 056b01
T(pid_t)
nsz 056b01
T(uid_t)
nsz 056b01
T(pthread_t)
nsz 056b01
T(pthread_attr_t)
nsz 056b01
T(struct timespec)
nsz 056b01
{
nsz 056b01
struct sigevent x;
nsz 056b01
F(int,sigev_notify)
nsz 056b01
F(int,sigev_signo)
nsz 056b01
F(union sigval,sigev_value)
nsz 056b01
{void (**y)(union sigval) = &x.sigev_notify_function;}
nsz 056b01
F(pthread_attr_t*,sigev_notify_attributes)
nsz 056b01
}
nsz 056b01
C(SIGEV_NONE)
nsz 056b01
C(SIGEV_SIGNAL)
nsz 056b01
C(SIGEV_THREAD)
nsz 056b01
{
nsz 056b01
union sigval x;
nsz 056b01
F(int,sival_int)
nsz 056b01
F(void*,sival_ptr)
nsz 056b01
}
nsz 056b01
{int i = SIGRTMIN;}
nsz 056b01
{int i = SIGRTMAX;}
nsz 056b01
#endif
nsz 056b01
C(SIGABRT)
nsz 056b01
C(SIGFPE)
nsz 056b01
C(SIGILL)
nsz 056b01
C(SIGINT)
nsz 056b01
C(SIGSEGV)
nsz 056b01
C(SIGTERM)
nsz 056b01
#ifdef _POSIX_C_SOURCE
nsz 056b01
C(SIGALRM)
nsz 056b01
C(SIGBUS)
nsz 056b01
C(SIGCHLD)
nsz 056b01
C(SIGCONT)
nsz 056b01
C(SIGHUP)
nsz 056b01
C(SIGKILL)
nsz 056b01
C(SIGPIPE)
nsz 056b01
C(SIGQUIT)
nsz 056b01
C(SIGSTOP)
nsz 056b01
C(SIGTSTP)
nsz 056b01
C(SIGTTIN)
nsz 056b01
C(SIGTTOU)
nsz 056b01
C(SIGUSR1)
nsz 056b01
C(SIGUSR2)
nsz 056b01
C(SIGURG)
nsz 056b01
#ifdef _XOPEN_SOURCE
nsz 056b01
C(SIGSYS)
nsz 056b01
C(SIGTRAP)
nsz 056b01
C(SIGVTALRM)
nsz 056b01
C(SIGXCPU)
nsz 056b01
C(SIGXFSZ)
nsz 056b01
#endif
nsz 056b01
{
nsz 056b01
struct sigaction x;
nsz 056b01
{void (**y)(int) = &x.sa_handler;}
nsz 056b01
F(sigset_t, sa_mask)
nsz 056b01
F(int,sa_flags)
nsz 056b01
{void (**y)(int, siginfo_t *, void *) = &x.sa_sigaction;}
nsz 056b01
}
nsz 056b01
C(SIG_BLOCK)
nsz 056b01
C(SIG_UNBLOCK)
nsz 056b01
C(SIG_SETMASK)
nsz 056b01
C(SA_NOCLDSTOP)
nsz 056b01
C(SA_RESETHAND)
nsz 056b01
C(SA_RESTART)
nsz 056b01
C(SA_SIGINFO)
nsz 056b01
C(SA_NOCLDWAIT)
nsz 056b01
C(SA_NODEFER)
nsz 056b01
#ifdef _XOPEN_SOURCE
nsz 056b01
C(SA_ONSTACK)
nsz 056b01
C(SS_ONSTACK)
nsz 056b01
C(SS_DISABLE)
nsz 056b01
C(MINSIGSTKSZ)
nsz 056b01
C(SIGSTKSZ)
nsz 056b01
#endif
nsz 056b01
T(mcontext_t)
nsz 056b01
{
nsz 056b01
ucontext_t x;
nsz 056b01
F(ucontext_t*,uc_link)
nsz 056b01
F(sigset_t,uc_sigmask)
nsz 056b01
F(stack_t, uc_stack)
nsz 056b01
F(mcontext_t,uc_mcontext)
nsz 056b01
}
nsz 056b01
{
nsz 056b01
stack_t x;
nsz 056b01
F(void *,ss_sp)
nsz 056b01
F(size_t,ss_size)
nsz 056b01
F(int, ss_flags)
nsz 056b01
}
nsz 056b01
{
nsz 056b01
siginfo_t x;
nsz 056b01
F(int, si_signo)
nsz 056b01
F(int, si_code)
nsz 056b01
#ifdef _XOPEN_SOURCE
nsz 056b01
F(int, si_errno)
nsz 056b01
#endif
nsz 056b01
F(pid_t, si_pid)
nsz 056b01
F(uid_t, si_uid)
nsz 056b01
F(void *,si_addr)
nsz 056b01
F(int, si_status)
nsz 056b01
F(union sigval,si_value)
nsz 056b01
}
nsz 056b01
C(ILL_ILLOPC)
nsz 056b01
C(ILL_ILLOPN)
nsz 056b01
C(ILL_ILLADR)
nsz 056b01
C(ILL_ILLTRP)
nsz 056b01
C(ILL_PRVOPC)
nsz 056b01
C(ILL_PRVREG)
nsz 056b01
C(ILL_COPROC)
nsz 056b01
C(ILL_BADSTK)
nsz 056b01
C(FPE_INTDIV)
nsz 056b01
C(FPE_INTOVF)
nsz 056b01
C(FPE_FLTDIV)
nsz 056b01
C(FPE_FLTOVF)
nsz 056b01
C(FPE_FLTUND)
nsz 056b01
C(FPE_FLTRES)
nsz 056b01
C(FPE_FLTINV)
nsz 056b01
C(FPE_FLTSUB)
nsz 056b01
C(SEGV_MAPERR)
nsz 056b01
C(SEGV_ACCERR)
nsz 056b01
C(BUS_ADRALN)
nsz 056b01
C(BUS_ADRERR)
nsz 056b01
C(BUS_OBJERR)
nsz 056b01
#ifdef _XOPEN_SOURCE
nsz 056b01
C(TRAP_BRKPT)
nsz 056b01
C(TRAP_TRACE)
nsz 056b01
#endif
nsz 056b01
C(CLD_EXITED)
nsz 056b01
C(CLD_KILLED)
nsz 056b01
C(CLD_DUMPED)
nsz 056b01
C(CLD_TRAPPED)
nsz 056b01
C(CLD_STOPPED)
nsz 056b01
C(CLD_CONTINUED)
nsz 056b01
C(SI_USER)
nsz 056b01
C(SI_QUEUE)
nsz 056b01
C(SI_TIMER)
nsz 056b01
C(SI_ASYNCIO)
nsz 056b01
C(SI_MESGQ)
nsz 056b01
int(*p_kill)(pid_t,int) = kill;
nsz 056b01
int(*p_killpg)(pid_t,int) = killpg;
nsz 056b01
void(*p_psiginfo)(const siginfo_t*,const char*) = psiginfo;
nsz 056b01
void(*p_psignal)(int,const char*) = psignal;
nsz 056b01
int(*p_pthread_kill)(pthread_t,int) = pthread_kill;
nsz 056b01
int(*p_pthread_sigmask)(int,const sigset_t*restrict,sigset_t*restrict) = pthread_sigmask;
nsz 056b01
int(*p_sigaction)(int,const struct sigaction*restrict,struct sigaction*restrict) = sigaction;
nsz 056b01
int(*p_sigaddset)(sigset_t*,int) = sigaddset;
nsz 056b01
int(*p_sigaltstack)(const stack_t*restrict,stack_t*restrict) = sigaltstack;
nsz 056b01
int(*p_sigdelset)(sigset_t*,int) = sigdelset;
nsz 056b01
int(*p_sigemptyset)(sigset_t*) = sigemptyset;
nsz 056b01
int(*p_sigfillset)(sigset_t*) = sigfillset;
nsz 056b01
int(*p_sighold)(int) = sighold;
nsz 056b01
int(*p_sigignore)(int) = sigignore;
nsz 056b01
int(*p_siginterrupt)(int,int) = siginterrupt;
nsz 056b01
int(*p_sigismember)(const sigset_t*,int) = sigismember;
nsz 056b01
int(*p_sigpause)(int) = sigpause;
nsz 056b01
int(*p_sigpending)(sigset_t*) = sigpending;
nsz 056b01
int(*p_sigprocmask)(int,const sigset_t*restrict,sigset_t*restrict) = sigprocmask;
nsz 056b01
int(*p_sigqueue)(pid_t,int,const union sigval) = sigqueue;
nsz 056b01
int(*p_sigrelse)(int) = sigrelse;
nsz 056b01
void(*(*p_sigset)(int,void(*)(int)))(int) = sigset;
nsz 056b01
int(*p_sigsuspend)(const sigset_t*) = sigsuspend;
nsz 056b01
int(*p_sigtimedwait)(const sigset_t*restrict,siginfo_t*restrict,const struct timespec*restrict) = sigtimedwait;
nsz 056b01
int(*p_sigwait)(const sigset_t*restrict,int*restrict) = sigwait;
nsz 056b01
int(*p_sigwaitinfo)(const sigset_t*restrict,siginfo_t*restrict) = sigwaitinfo;
nsz 056b01
#endif
nsz 056b01
int(*p_raise)(int) = raise;
nsz 056b01
void(*(*p_signal)(int,void(*)(int)))(int) = signal;
nsz 056b01
}