diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 12:27:27 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 20:43:08 +0400 |
commit | 61b63c556c0877ee6d3832ee641bc427ff4d94d6 (patch) | |
tree | e35a047a7b11f349d3d68ac18639bc33801ec001 /arch/um/os-Linux/signal.c | |
parent | 5f734614fc6218db352d26571ab4d1604620199c (diff) | |
download | linux-61b63c556c0877ee6d3832ee641bc427ff4d94d6.tar.xz |
uml: eliminate SIGALRM
Now that ITIMER_REAL is no longer used, there is no need for any use of
SIGALRM whatsoever. This patch removes all mention of it.
In addition, real_alarm_handler took a signal argument which is now always
SIGVTALRM. So, that is gone.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux/signal.c')
-rw-r--r-- | arch/um/os-Linux/signal.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index fbad174775ee..e9800b0b5689 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c @@ -15,8 +15,7 @@ #include "user.h" /* - * These are the asynchronous signals. SIGVTALRM and SIGARLM are handled - * together under SIGVTALRM_BIT. SIGPROF is excluded because we want to + * These are the asynchronous signals. SIGPROF is excluded because we want to * be able to profile all of UML, not just the non-critical sections. If * profiling is not thread-safe, then that is not my problem. We can disable * profiling when SMP is enabled in that case. @@ -27,9 +26,6 @@ #define SIGVTALRM_BIT 1 #define SIGVTALRM_MASK (1 << SIGVTALRM_BIT) -#define SIGALRM_BIT 2 -#define SIGALRM_MASK (1 << SIGALRM_BIT) - /* * These are used by both the signal handlers and * block/unblock_signals. I don't want modifications cached in a @@ -55,7 +51,7 @@ void sig_handler(int sig, struct sigcontext *sc) set_signals(enabled); } -static void real_alarm_handler(int sig, struct sigcontext *sc) +static void real_alarm_handler(struct sigcontext *sc) { struct uml_pt_regs regs; @@ -63,7 +59,7 @@ static void real_alarm_handler(int sig, struct sigcontext *sc) copy_sc(®s, sc); regs.is_user = 0; unblock_signals(); - timer_handler(sig, ®s); + timer_handler(SIGVTALRM, ®s); } void alarm_handler(int sig, struct sigcontext *sc) @@ -72,27 +68,20 @@ void alarm_handler(int sig, struct sigcontext *sc) enabled = signals_enabled; if (!signals_enabled) { - if (sig == SIGVTALRM) - pending |= SIGVTALRM_MASK; - else pending |= SIGALRM_MASK; - + pending |= SIGVTALRM_MASK; return; } block_signals(); - real_alarm_handler(sig, sc); + real_alarm_handler(sc); 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); + SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, -1); } void set_sigstack(void *sig_stack, int size) @@ -267,11 +256,8 @@ void unblock_signals(void) if (save_pending & SIGIO_MASK) sig_handler_common_skas(SIGIO, NULL); - if (save_pending & SIGALRM_MASK) - real_alarm_handler(SIGALRM, NULL); - if (save_pending & SIGVTALRM_MASK) - real_alarm_handler(SIGVTALRM, NULL); + real_alarm_handler(NULL); } } |