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