diff options
Diffstat (limited to 'arch/um/os-Linux/process.c')
-rw-r--r-- | arch/um/os-Linux/process.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 233be2f4f8cb..b98d3ca2cd1b 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -250,36 +250,35 @@ void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) | |||
250 | if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1); | 250 | if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1); |
251 | } | 251 | } |
252 | 252 | ||
253 | void init_new_thread_signals(int altstack) | 253 | void init_new_thread_signals(void) |
254 | { | 254 | { |
255 | int flags = altstack ? SA_ONSTACK : 0; | 255 | set_handler(SIGSEGV, (__sighandler_t) sig_handler, SA_ONSTACK, |
256 | |||
257 | set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags, | ||
258 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 256 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
259 | set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, | 257 | set_handler(SIGTRAP, (__sighandler_t) sig_handler, SA_ONSTACK, |
260 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 258 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
261 | set_handler(SIGFPE, (__sighandler_t) sig_handler, flags, | 259 | set_handler(SIGFPE, (__sighandler_t) sig_handler, SA_ONSTACK, |
262 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 260 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
263 | set_handler(SIGILL, (__sighandler_t) sig_handler, flags, | 261 | set_handler(SIGILL, (__sighandler_t) sig_handler, SA_ONSTACK, |
264 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 262 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
265 | set_handler(SIGBUS, (__sighandler_t) sig_handler, flags, | 263 | set_handler(SIGBUS, (__sighandler_t) sig_handler, SA_ONSTACK, |
266 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 264 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
267 | set_handler(SIGUSR2, (__sighandler_t) sig_handler, | 265 | set_handler(SIGUSR2, (__sighandler_t) sig_handler, |
268 | flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 266 | SA_ONSTACK, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, |
267 | -1); | ||
269 | signal(SIGHUP, SIG_IGN); | 268 | signal(SIGHUP, SIG_IGN); |
270 | 269 | ||
271 | init_irq_signals(altstack); | 270 | init_irq_signals(1); |
272 | } | 271 | } |
273 | 272 | ||
274 | int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) | 273 | int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) |
275 | { | 274 | { |
276 | jmp_buf buf; | 275 | jmp_buf buf; |
277 | int n, enable; | 276 | int n; |
278 | 277 | ||
279 | *jmp_ptr = &buf; | 278 | *jmp_ptr = &buf; |
280 | n = UML_SETJMP(&buf, enable); | 279 | n = UML_SETJMP(&buf); |
281 | if(n != 0) | 280 | if(n != 0) |
282 | return(n); | 281 | return n; |
283 | (*fn)(arg); | 282 | (*fn)(arg); |
284 | return(0); | 283 | return 0; |
285 | } | 284 | } |