diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:27:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:08 -0400 |
commit | 61b63c556c0877ee6d3832ee641bc427ff4d94d6 (patch) | |
tree | e35a047a7b11f349d3d68ac18639bc33801ec001 /arch/um/os-Linux/signal.c | |
parent | 5f734614fc6218db352d26571ab4d1604620199c (diff) |
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 @@ | |||
15 | #include "user.h" | 15 | #include "user.h" |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * These are the asynchronous signals. SIGVTALRM and SIGARLM are handled | 18 | * These are the asynchronous signals. SIGPROF is excluded because we want to |
19 | * together under SIGVTALRM_BIT. SIGPROF is excluded because we want to | ||
20 | * be able to profile all of UML, not just the non-critical sections. If | 19 | * be able to profile all of UML, not just the non-critical sections. If |
21 | * profiling is not thread-safe, then that is not my problem. We can disable | 20 | * profiling is not thread-safe, then that is not my problem. We can disable |
22 | * profiling when SMP is enabled in that case. | 21 | * profiling when SMP is enabled in that case. |
@@ -27,9 +26,6 @@ | |||
27 | #define SIGVTALRM_BIT 1 | 26 | #define SIGVTALRM_BIT 1 |
28 | #define SIGVTALRM_MASK (1 << SIGVTALRM_BIT) | 27 | #define SIGVTALRM_MASK (1 << SIGVTALRM_BIT) |
29 | 28 | ||
30 | #define SIGALRM_BIT 2 | ||
31 | #define SIGALRM_MASK (1 << SIGALRM_BIT) | ||
32 | |||
33 | /* | 29 | /* |
34 | * These are used by both the signal handlers and | 30 | * These are used by both the signal handlers and |
35 | * block/unblock_signals. I don't want modifications cached in a | 31 | * block/unblock_signals. I don't want modifications cached in a |
@@ -55,7 +51,7 @@ void sig_handler(int sig, struct sigcontext *sc) | |||
55 | set_signals(enabled); | 51 | set_signals(enabled); |
56 | } | 52 | } |
57 | 53 | ||
58 | static void real_alarm_handler(int sig, struct sigcontext *sc) | 54 | static void real_alarm_handler(struct sigcontext *sc) |
59 | { | 55 | { |
60 | struct uml_pt_regs regs; | 56 | struct uml_pt_regs regs; |
61 | 57 | ||
@@ -63,7 +59,7 @@ static void real_alarm_handler(int sig, struct sigcontext *sc) | |||
63 | copy_sc(®s, sc); | 59 | copy_sc(®s, sc); |
64 | regs.is_user = 0; | 60 | regs.is_user = 0; |
65 | unblock_signals(); | 61 | unblock_signals(); |
66 | timer_handler(sig, ®s); | 62 | timer_handler(SIGVTALRM, ®s); |
67 | } | 63 | } |
68 | 64 | ||
69 | void alarm_handler(int sig, struct sigcontext *sc) | 65 | void alarm_handler(int sig, struct sigcontext *sc) |
@@ -72,27 +68,20 @@ void alarm_handler(int sig, struct sigcontext *sc) | |||
72 | 68 | ||
73 | enabled = signals_enabled; | 69 | enabled = signals_enabled; |
74 | if (!signals_enabled) { | 70 | if (!signals_enabled) { |
75 | if (sig == SIGVTALRM) | 71 | pending |= SIGVTALRM_MASK; |
76 | pending |= SIGVTALRM_MASK; | ||
77 | else pending |= SIGALRM_MASK; | ||
78 | |||
79 | return; | 72 | return; |
80 | } | 73 | } |
81 | 74 | ||
82 | block_signals(); | 75 | block_signals(); |
83 | 76 | ||
84 | real_alarm_handler(sig, sc); | 77 | real_alarm_handler(sc); |
85 | set_signals(enabled); | 78 | set_signals(enabled); |
86 | } | 79 | } |
87 | 80 | ||
88 | void timer_init(void) | 81 | void timer_init(void) |
89 | { | 82 | { |
90 | set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, | 83 | set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, |
91 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, | 84 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, -1); |
92 | SIGALRM, -1); | ||
93 | set_handler(SIGALRM, (__sighandler_t) alarm_handler, | ||
94 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, | ||
95 | SIGALRM, -1); | ||
96 | } | 85 | } |
97 | 86 | ||
98 | void set_sigstack(void *sig_stack, int size) | 87 | void set_sigstack(void *sig_stack, int size) |
@@ -267,11 +256,8 @@ void unblock_signals(void) | |||
267 | if (save_pending & SIGIO_MASK) | 256 | if (save_pending & SIGIO_MASK) |
268 | sig_handler_common_skas(SIGIO, NULL); | 257 | sig_handler_common_skas(SIGIO, NULL); |
269 | 258 | ||
270 | if (save_pending & SIGALRM_MASK) | ||
271 | real_alarm_handler(SIGALRM, NULL); | ||
272 | |||
273 | if (save_pending & SIGVTALRM_MASK) | 259 | if (save_pending & SIGVTALRM_MASK) |
274 | real_alarm_handler(SIGVTALRM, NULL); | 260 | real_alarm_handler(NULL); |
275 | } | 261 | } |
276 | } | 262 | } |
277 | 263 | ||