diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-07-10 07:45:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:23 -0400 |
commit | e64bd134085451fe3f751025c5d5a70729164b7c (patch) | |
tree | 547aaa97aa3a8226b2c028c56adc9671477131b8 /arch/um/os-Linux/process.c | |
parent | 9914aee827322f46c306d724b38ad73af7daa9a5 (diff) |
[PATCH] uml: signal initialization cleanup
It turns out that init_new_thread_signals is always called with altstack == 1,
so we can eliminate the parameter.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/os-Linux/process.c')
-rw-r--r-- | arch/um/os-Linux/process.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 233be2f4f8cb..b1cda818f5b5 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -250,25 +250,24 @@ 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) |