[PATCH 10/11] UML - Eliminate SIGALRM usage

2007-09-12 Thread Jeff Dike
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 <[EMAIL PROTECTED]>
--
 arch/um/os-Linux/irq.c  |2 +-
 arch/um/os-Linux/main.c |2 +-
 arch/um/os-Linux/process.c  |   10 +-
 arch/um/os-Linux/signal.c   |   28 +++-
 arch/um/os-Linux/skas/process.c |4 +---
 arch/um/os-Linux/skas/trap.c|5 ++---
 arch/um/os-Linux/trap.c |1 -
 7 files changed, 17 insertions(+), 35 deletions(-)

Index: linux-2.6.22/arch/um/os-Linux/skas/process.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/skas/process.c   2007-09-12 
15:39:37.0 -0400
+++ linux-2.6.22/arch/um/os-Linux/skas/process.c2007-09-12 
15:47:42.0 -0400
@@ -222,7 +222,6 @@ static int userspace_tramp(void *stack)
sigemptyset(_mask);
sigaddset(_mask, SIGIO);
sigaddset(_mask, SIGWINCH);
-   sigaddset(_mask, SIGALRM);
sigaddset(_mask, SIGVTALRM);
sigaddset(_mask, SIGUSR1);
sa.sa_flags = SA_ONSTACK;
@@ -522,8 +521,7 @@ int start_idle_thread(void *stack, jmp_b
int n;
 
set_handler(SIGWINCH, (__sighandler_t) sig_handler,
-   SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGALRM,
-   SIGVTALRM, -1);
+   SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGVTALRM, -1);
 
/*
 * Can't use UML_SETJMP or UML_LONGJMP here because they save
Index: linux-2.6.22/arch/um/os-Linux/irq.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/irq.c2007-09-12 14:50:58.0 
-0400
+++ linux-2.6.22/arch/um/os-Linux/irq.c 2007-09-12 15:47:42.0 -0400
@@ -146,6 +146,6 @@ void init_irq_signals(int on_sigstack)
flags = on_sigstack ? SA_ONSTACK : 0;
 
set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
signal(SIGWINCH, SIG_IGN);
 }
Index: linux-2.6.22/arch/um/os-Linux/main.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/main.c   2007-09-11 14:09:28.0 
-0400
+++ linux-2.6.22/arch/um/os-Linux/main.c2007-09-12 15:47:42.0 
-0400
@@ -161,7 +161,7 @@ int __init main(int argc, char **argv, c
 * some time) and cause a segfault.
 */
 
-   /* stop timers and set SIG*ALRM to be ignored */
+   /* stop timers and set SIGVTALRM to be ignored */
disable_timer();
 
/* disable SIGIO for the fds and set SIGIO to be ignored */
Index: linux-2.6.22/arch/um/os-Linux/process.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/process.c2007-09-12 
14:50:58.0 -0400
+++ linux-2.6.22/arch/um/os-Linux/process.c 2007-09-12 15:47:42.0 
-0400
@@ -238,15 +238,15 @@ out:
 void init_new_thread_signals(void)
 {
set_handler(SIGSEGV, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGTRAP, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGFPE, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGILL, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGBUS, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
signal(SIGHUP, SIG_IGN);
 
init_irq_signals(1);
Index: linux-2.6.22/arch/um/os-Linux/signal.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/signal.c 2007-09-12 15:41:04.0 
-0400
+++ linux-2.6.22/arch/um/os-Linux/signal.c  2007-09-12 15:48:20.0 
-0400
@@ -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 

[PATCH 10/11] UML - Eliminate SIGALRM usage

2007-09-12 Thread Jeff Dike
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 [EMAIL PROTECTED]
--
 arch/um/os-Linux/irq.c  |2 +-
 arch/um/os-Linux/main.c |2 +-
 arch/um/os-Linux/process.c  |   10 +-
 arch/um/os-Linux/signal.c   |   28 +++-
 arch/um/os-Linux/skas/process.c |4 +---
 arch/um/os-Linux/skas/trap.c|5 ++---
 arch/um/os-Linux/trap.c |1 -
 7 files changed, 17 insertions(+), 35 deletions(-)

Index: linux-2.6.22/arch/um/os-Linux/skas/process.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/skas/process.c   2007-09-12 
15:39:37.0 -0400
+++ linux-2.6.22/arch/um/os-Linux/skas/process.c2007-09-12 
15:47:42.0 -0400
@@ -222,7 +222,6 @@ static int userspace_tramp(void *stack)
sigemptyset(sa.sa_mask);
sigaddset(sa.sa_mask, SIGIO);
sigaddset(sa.sa_mask, SIGWINCH);
-   sigaddset(sa.sa_mask, SIGALRM);
sigaddset(sa.sa_mask, SIGVTALRM);
sigaddset(sa.sa_mask, SIGUSR1);
sa.sa_flags = SA_ONSTACK;
@@ -522,8 +521,7 @@ int start_idle_thread(void *stack, jmp_b
int n;
 
set_handler(SIGWINCH, (__sighandler_t) sig_handler,
-   SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGALRM,
-   SIGVTALRM, -1);
+   SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGVTALRM, -1);
 
/*
 * Can't use UML_SETJMP or UML_LONGJMP here because they save
Index: linux-2.6.22/arch/um/os-Linux/irq.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/irq.c2007-09-12 14:50:58.0 
-0400
+++ linux-2.6.22/arch/um/os-Linux/irq.c 2007-09-12 15:47:42.0 -0400
@@ -146,6 +146,6 @@ void init_irq_signals(int on_sigstack)
flags = on_sigstack ? SA_ONSTACK : 0;
 
set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
signal(SIGWINCH, SIG_IGN);
 }
Index: linux-2.6.22/arch/um/os-Linux/main.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/main.c   2007-09-11 14:09:28.0 
-0400
+++ linux-2.6.22/arch/um/os-Linux/main.c2007-09-12 15:47:42.0 
-0400
@@ -161,7 +161,7 @@ int __init main(int argc, char **argv, c
 * some time) and cause a segfault.
 */
 
-   /* stop timers and set SIG*ALRM to be ignored */
+   /* stop timers and set SIGVTALRM to be ignored */
disable_timer();
 
/* disable SIGIO for the fds and set SIGIO to be ignored */
Index: linux-2.6.22/arch/um/os-Linux/process.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/process.c2007-09-12 
14:50:58.0 -0400
+++ linux-2.6.22/arch/um/os-Linux/process.c 2007-09-12 15:47:42.0 
-0400
@@ -238,15 +238,15 @@ out:
 void init_new_thread_signals(void)
 {
set_handler(SIGSEGV, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGTRAP, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGFPE, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGILL, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
set_handler(SIGBUS, (__sighandler_t) sig_handler, SA_ONSTACK,
-   SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
+   SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
signal(SIGHUP, SIG_IGN);
 
init_irq_signals(1);
Index: linux-2.6.22/arch/um/os-Linux/signal.c
===
--- linux-2.6.22.orig/arch/um/os-Linux/signal.c 2007-09-12 15:41:04.0 
-0400
+++ linux-2.6.22/arch/um/os-Linux/signal.c  2007-09-12 15:48:20.0 
-0400
@@ -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