1 /* $NetBSD: rumpuser_sigtrans.c,v 1.1 2014/02/20 00:42:27 pooka Exp $ */ 2 3 /* 4 * pseudo-automatically generated. PLEASE DO EDIT (e.g. in case there 5 * are errnos which are defined to be the same value) 6 * 7 * The body of the switch statement was generated using: 8 * 9 * awk '/^#define/ && $2 ~ "^SIG[A-Z]" \ 10 * {printf "#ifdef %s\n\tcase %d\t: return %s;\n#endif\n", $2, $3, $2}' \ 11 * signal.h 12 */ 13 14 #include <signal.h> 15 16 /* 17 * Translate rump kernel signal number to host signal number 18 */ 19 int rumpuser__sig_rump2host(int); /* a naughty decouple */ 20 int rumpuser__sig_rump2host(int rumpsig)21rumpuser__sig_rump2host(int rumpsig) 22 { 23 24 switch(rumpsig) { 25 case 0 : return 0; 26 #ifdef SIGHUP 27 case 1 : return SIGHUP; 28 #endif 29 #ifdef SIGINT 30 case 2 : return SIGINT; 31 #endif 32 #ifdef SIGQUIT 33 case 3 : return SIGQUIT; 34 #endif 35 #ifdef SIGILL 36 case 4 : return SIGILL; 37 #endif 38 #ifdef SIGTRAP 39 case 5 : return SIGTRAP; 40 #endif 41 #ifdef SIGABRT 42 case 6 : return SIGABRT; 43 #endif 44 #ifdef SIGEMT 45 case 7 : return SIGEMT; 46 #endif 47 #ifdef SIGFPE 48 case 8 : return SIGFPE; 49 #endif 50 #ifdef SIGKILL 51 case 9 : return SIGKILL; 52 #endif 53 #ifdef SIGBUS 54 case 10 : return SIGBUS; 55 #endif 56 #ifdef SIGSEGV 57 case 11 : return SIGSEGV; 58 #endif 59 #ifdef SIGSYS 60 case 12 : return SIGSYS; 61 #endif 62 #ifdef SIGPIPE 63 case 13 : return SIGPIPE; 64 #endif 65 #ifdef SIGALRM 66 case 14 : return SIGALRM; 67 #endif 68 #ifdef SIGTERM 69 case 15 : return SIGTERM; 70 #endif 71 #ifdef SIGURG 72 case 16 : return SIGURG; 73 #endif 74 #ifdef SIGSTOP 75 case 17 : return SIGSTOP; 76 #endif 77 #ifdef SIGTSTP 78 case 18 : return SIGTSTP; 79 #endif 80 #ifdef SIGCONT 81 case 19 : return SIGCONT; 82 #endif 83 #ifdef SIGCHLD 84 case 20 : return SIGCHLD; 85 #elif defined(SIGCLD) 86 case 20 : return SIGCLD; 87 #endif 88 #ifdef SIGTTIN 89 case 21 : return SIGTTIN; 90 #endif 91 #ifdef SIGTTOU 92 case 22 : return SIGTTOU; 93 #endif 94 #ifdef SIGIO 95 case 23 : return SIGIO; 96 #endif 97 #ifdef SIGXCPU 98 case 24 : return SIGXCPU; 99 #endif 100 #ifdef SIGXFSZ 101 case 25 : return SIGXFSZ; 102 #endif 103 #ifdef SIGVTALRM 104 case 26 : return SIGVTALRM; 105 #endif 106 #ifdef SIGPROF 107 case 27 : return SIGPROF; 108 #endif 109 #ifdef SIGWINCH 110 case 28 : return SIGWINCH; 111 #endif 112 #ifdef SIGINFO 113 case 29 : return SIGINFO; 114 #endif 115 #ifdef SIGUSR1 116 case 30 : return SIGUSR1; 117 #endif 118 #ifdef SIGUSR2 119 case 31 : return SIGUSR2; 120 #endif 121 #ifdef SIGPWR 122 case 32 : return SIGPWR; 123 #endif 124 default: return -1; 125 } 126 } 127