1*9c092804SMarkus Armbruster #ifndef TARGET_OS_SIGNAL_H 2*9c092804SMarkus Armbruster #define TARGET_OS_SIGNAL_H 3790baaccSWarner Losh 4790baaccSWarner Losh #include "target_os_siginfo.h" 5790baaccSWarner Losh #include "target_arch_signal.h" 6790baaccSWarner Losh 7790baaccSWarner Losh #define TARGET_SIGHUP 1 /* hangup */ 8790baaccSWarner Losh #define TARGET_SIGINT 2 /* interrupt */ 9790baaccSWarner Losh #define TARGET_SIGQUIT 3 /* quit */ 10790baaccSWarner Losh #define TARGET_SIGILL 4 /* illegal instruction (not reset when caught) */ 11790baaccSWarner Losh #define TARGET_SIGTRAP 5 /* trace trap (not reset when caught) */ 12790baaccSWarner Losh #define TARGET_SIGABRT 6 /* abort() */ 13790baaccSWarner Losh #define TARGET_SIGIOT SIGABRT /* compatibility */ 14790baaccSWarner Losh #define TARGET_SIGEMT 7 /* EMT instruction */ 15790baaccSWarner Losh #define TARGET_SIGFPE 8 /* floating point exception */ 16790baaccSWarner Losh #define TARGET_SIGKILL 9 /* kill (cannot be caught or ignored) */ 17790baaccSWarner Losh #define TARGET_SIGBUS 10 /* bus error */ 18790baaccSWarner Losh #define TARGET_SIGSEGV 11 /* segmentation violation */ 19790baaccSWarner Losh #define TARGET_SIGSYS 12 /* bad argument to system call */ 20790baaccSWarner Losh #define TARGET_SIGPIPE 13 /* write on a pipe with no one to read it */ 21790baaccSWarner Losh #define TARGET_SIGALRM 14 /* alarm clock */ 22790baaccSWarner Losh #define TARGET_SIGTERM 15 /* software termination signal from kill */ 23790baaccSWarner Losh #define TARGET_SIGURG 16 /* urgent condition on IO channel */ 24790baaccSWarner Losh #define TARGET_SIGSTOP 17 /* sendable stop signal not from tty */ 25790baaccSWarner Losh #define TARGET_SIGTSTP 18 /* stop signal from tty */ 26790baaccSWarner Losh #define TARGET_SIGCONT 19 /* continue a stopped process */ 27790baaccSWarner Losh #define TARGET_SIGCHLD 20 /* to parent on child stop or exit */ 28790baaccSWarner Losh #define TARGET_SIGTTIN 21 /* to readers pgrp upon background tty read */ 29790baaccSWarner Losh #define TARGET_SIGTTOU 22 /* like TTIN for out if (tp->t_local<OSTOP) */ 30790baaccSWarner Losh #define TARGET_SIGIO 23 /* input/output possible signal */ 31790baaccSWarner Losh #define TARGET_SIGXCPU 24 /* exceeded CPU time limit */ 32790baaccSWarner Losh #define TARGET_SIGXFSZ 25 /* exceeded file size limit */ 33790baaccSWarner Losh #define TARGET_SIGVTALRM 26 /* virtual time alarm */ 34790baaccSWarner Losh #define TARGET_SIGPROF 27 /* profiling time alarm */ 35790baaccSWarner Losh #define TARGET_SIGWINCH 28 /* window size changes */ 36790baaccSWarner Losh #define TARGET_SIGINFO 29 /* information request */ 37790baaccSWarner Losh #define TARGET_SIGUSR1 30 /* user defined signal 1 */ 38790baaccSWarner Losh #define TARGET_SIGUSR2 31 /* user defined signal 2 */ 39790baaccSWarner Losh 40790baaccSWarner Losh /* 41790baaccSWarner Losh * Language spec says we must list exactly one parameter, even though we 42790baaccSWarner Losh * actually supply three. Ugh! 43790baaccSWarner Losh */ 44790baaccSWarner Losh #define TARGET_SIG_DFL ((void (*)(int))0) 45790baaccSWarner Losh #define TARGET_SIG_IGN ((void (*)(int))1) 46790baaccSWarner Losh #define TARGET_SIG_ERR ((void (*)(int))-1) 47790baaccSWarner Losh 48790baaccSWarner Losh #define TARGET_SA_ONSTACK 0x0001 /* take signal on signal stack */ 49790baaccSWarner Losh #define TARGET_SA_RESTART 0x0002 /* restart system on signal return */ 50790baaccSWarner Losh #define TARGET_SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ 51790baaccSWarner Losh #define TARGET_SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ 52790baaccSWarner Losh #define TARGET_SA_NOCLDWAIT 0x0020 /* don't create zombies (assign to pid 1) */ 53790baaccSWarner Losh #define TARGET_SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */ 54790baaccSWarner Losh #define TARGET_SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ 55790baaccSWarner Losh #define TARGET_SA_SIGINFO 0x0040 /* generate siginfo_t */ 56790baaccSWarner Losh 57790baaccSWarner Losh /* 58790baaccSWarner Losh * Flags for sigprocmask: 59790baaccSWarner Losh */ 60790baaccSWarner Losh #define TARGET_SIG_BLOCK 1 /* block specified signal set */ 61790baaccSWarner Losh #define TARGET_SIG_UNBLOCK 2 /* unblock specified signal set */ 62790baaccSWarner Losh #define TARGET_SIG_SETMASK 3 /* set specified signal set */ 63790baaccSWarner Losh 64790baaccSWarner Losh #define TARGET_BADSIG SIG_ERR 65790baaccSWarner Losh 66790baaccSWarner Losh #define TARGET_SS_ONSTACK 0x0001 /* take signals on alternate stack */ 67790baaccSWarner Losh #define TARGET_SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ 68790baaccSWarner Losh 69*9c092804SMarkus Armbruster #endif /* TARGET_OS_SIGNAL_H */ 70