diff options
-rw-r--r-- | arch/um/include/os.h | 1 | ||||
-rw-r--r-- | arch/um/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/um/os-Linux/irq.c | 4 | ||||
-rw-r--r-- | arch/um/os-Linux/signal.c | 10 |
4 files changed, 13 insertions, 4 deletions
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 1897785fd571..a6d80721d3c4 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -227,6 +227,7 @@ extern int set_umid(char *name); | |||
227 | extern char *get_umid(void); | 227 | extern char *get_umid(void); |
228 | 228 | ||
229 | /* signal.c */ | 229 | /* signal.c */ |
230 | extern void timer_init(void); | ||
230 | extern void set_sigstack(void *sig_stack, int size); | 231 | extern void set_sigstack(void *sig_stack, int size); |
231 | extern void remove_sigstack(void); | 232 | extern void remove_sigstack(void); |
232 | extern void set_handler(int sig, void (*handler)(int), int flags, ...); | 233 | extern void set_handler(int sig, void (*handler)(int), int flags, ...); |
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 2bda07dcd345..758d4f9cb22a 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
@@ -97,6 +97,8 @@ static void register_timer(void) | |||
97 | { | 97 | { |
98 | int err; | 98 | int err; |
99 | 99 | ||
100 | timer_init(); | ||
101 | |||
100 | err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL); | 102 | err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL); |
101 | if (err != 0) | 103 | if (err != 0) |
102 | printk(KERN_ERR "register_timer : request_irq failed - " | 104 | printk(KERN_ERR "register_timer : request_irq failed - " |
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c index a633fa8e0a94..2fe482219b6b 100644 --- a/arch/um/os-Linux/irq.c +++ b/arch/um/os-Linux/irq.c | |||
@@ -145,10 +145,6 @@ void init_irq_signals(int on_sigstack) | |||
145 | 145 | ||
146 | flags = on_sigstack ? SA_ONSTACK : 0; | 146 | flags = on_sigstack ? SA_ONSTACK : 0; |
147 | 147 | ||
148 | set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, | ||
149 | flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); | ||
150 | set_handler(SIGALRM, (__sighandler_t) alarm_handler, | ||
151 | flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); | ||
152 | set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART, | 148 | set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART, |
153 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 149 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
154 | signal(SIGWINCH, SIG_IGN); | 150 | signal(SIGWINCH, SIG_IGN); |
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index 1c5267ec13b0..53593c8b9c34 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c | |||
@@ -85,6 +85,16 @@ void alarm_handler(int sig, struct sigcontext *sc) | |||
85 | set_signals(enabled); | 85 | set_signals(enabled); |
86 | } | 86 | } |
87 | 87 | ||
88 | void timer_init(void) | ||
89 | { | ||
90 | set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, | ||
91 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, | ||
92 | SIGALRM, -1); | ||
93 | set_handler(SIGALRM, (__sighandler_t) alarm_handler, | ||
94 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, | ||
95 | SIGALRM, -1); | ||
96 | } | ||
97 | |||
88 | void set_sigstack(void *sig_stack, int size) | 98 | void set_sigstack(void *sig_stack, int size) |
89 | { | 99 | { |
90 | stack_t stack = ((stack_t) { .ss_flags = 0, | 100 | stack_t stack = ((stack_t) { .ss_flags = 0, |