aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/irq.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-07-10 07:45:05 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:23 -0400
commitaceb343464a136e1c0de5294b097a1f9ab018870 (patch)
treedb42e6d7b059948b3ef0d957fb9dcc87462c7fd3 /arch/um/os-Linux/irq.c
parent598d188af1a0645dc75c9541eff0017a4f6d9987 (diff)
[PATCH] uml: timer initialization cleanup
This cleans up the mess that is the timer initialization. There used to be two timer handlers - one that basically ran during delay loop calibration and one that handled the timer afterwards. There were also two sets of timer initialization code - one that starts in user code and calls into the kernel side of the house, and one that starts in kernel code and calls user code. This eliminates one timer handler and consolidates the two sets of initialization code. [akpm@osdl.org: use new INTF_ flags] 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/irq.c')
-rw-r--r--arch/um/os-Linux/irq.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c
index 3788d4568d33..64c114b02701 100644
--- a/arch/um/os-Linux/irq.c
+++ b/arch/um/os-Linux/irq.c
@@ -142,17 +142,14 @@ void os_set_ioignore(void)
142 142
143void init_irq_signals(int on_sigstack) 143void init_irq_signals(int on_sigstack)
144{ 144{
145 __sighandler_t h;
146 int flags; 145 int flags;
147 146
148 flags = on_sigstack ? SA_ONSTACK : 0; 147 flags = on_sigstack ? SA_ONSTACK : 0;
149 if (timer_irq_inited)
150 h = (__sighandler_t)alarm_handler;
151 else
152 h = boot_timer_handler;
153 148
154 set_handler(SIGVTALRM, h, flags | SA_RESTART, 149 set_handler(SIGVTALRM, (__sighandler_t) alarm_handler,
155 SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); 150 flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1);
151 set_handler(SIGALRM, (__sighandler_t) alarm_handler,
152 flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1);
156 set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART, 153 set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
157 SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); 154 SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
158 signal(SIGWINCH, SIG_IGN); 155 signal(SIGWINCH, SIG_IGN);