Move timer signal initialization from init_irq_signals to a new
function, timer_init.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
arch/um/include/os.h | 1 +
arch/um/kernel/time.c | 2 ++
arch/um/os-Linux/irq.c | 4 ----
arch/um/os-Linux/signal.c | 10 ++++++++++
4 files changed, 13 insertions(+), 4 deletions(-)
Index: linux-2.6.22/arch/um/kernel/time.c
===================================================================
--- linux-2.6.22.orig/arch/um/kernel/time.c 2007-09-09 11:51:19.000000000 -0400
+++ linux-2.6.22/arch/um/kernel/time.c 2007-09-12 14:55:39.000000000 -0400
@@ -97,6 +97,8 @@ static void register_timer(void)
{
int err;
+ timer_init();
+
err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL);
if (err != 0)
printk(KERN_ERR "register_timer : request_irq failed - "
Index: linux-2.6.22/arch/um/os-Linux/irq.c
===================================================================
--- linux-2.6.22.orig/arch/um/os-Linux/irq.c 2007-09-09 10:23:31.000000000 -0400
+++ linux-2.6.22/arch/um/os-Linux/irq.c 2007-09-12 14:50:58.000000000 -0400
@@ -145,10 +145,6 @@ void init_irq_signals(int on_sigstack)
flags = on_sigstack ? SA_ONSTACK : 0;
- set_handler(SIGVTALRM, (__sighandler_t) alarm_handler,
- flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1);
- set_handler(SIGALRM, (__sighandler_t) alarm_handler,
- flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1);
set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
signal(SIGWINCH, SIG_IGN);
Index: linux-2.6.22/arch/um/include/os.h
===================================================================
--- linux-2.6.22.orig/arch/um/include/os.h 2007-09-12 14:53:25.000000000 -0400
+++ linux-2.6.22/arch/um/include/os.h 2007-09-12 14:56:15.000000000 -0400
@@ -227,6 +227,7 @@ extern int set_umid(char *name);
extern char *get_umid(void);
/* signal.c */
+extern void timer_init(void);
extern void set_sigstack(void *sig_stack, int size);
extern void remove_sigstack(void);
extern void set_handler(int sig, void (*handler)(int), int flags, ...);
Index: linux-2.6.22/arch/um/os-Linux/signal.c
===================================================================
--- linux-2.6.22.orig/arch/um/os-Linux/signal.c 2007-09-11 20:28:13.000000000 -0400
+++ linux-2.6.22/arch/um/os-Linux/signal.c 2007-09-12 14:55:18.000000000 -0400
@@ -85,6 +85,16 @@ void alarm_handler(int sig, struct sigco
set_signals(enabled);
}
+void timer_init(void)
+{
+ set_handler(SIGVTALRM, (__sighandler_t) alarm_handler,
+ SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH,
+ SIGALRM, -1);
+ set_handler(SIGALRM, (__sighandler_t) alarm_handler,
+ SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH,
+ SIGALRM, -1);
+}
+
void set_sigstack(void *sig_stack, int size)
{
stack_t stack = ((stack_t) { .ss_flags = 0,
-
| Lee Revell | Re: [RFC][PATCH] cpuidle: avoid singing capacitors |
| Ingo Molnar | [bug] latest -git boot hang |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Christoph Hellwig | Re: 2.6.24-rc6-mm1 |
git: | |
| Imran M Yousuf | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Dan Zwell | [PATCH] Color support added to git-add--interactive. |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Petr Vandrovec | Re: Fwd: [OT] Re: Git via a proxy server? |
| Lars Hansson | Re: Code signing in OpenBSD |
| Richard Stallman | Real men don't attack straw men |
| Pau | acer aspire one dmesg? |
| Henning Brauer | Re: About Xen: maybe a reiterative question but .. |
| Jarek Poplawski | Re: loaded router, excessive getnstimeofday in oprofile |
| Julius Volz | [PATCH RFC 20/24] IPVS: Add validity checks when adding/editing v6 services |
| Bruno | [PATCH 1/2] r8169: WoL fixes |
| Corey Hickey | [PATCH 01/10] Preparatory refactoring part 1. |
