All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] [PATCH 6/7] UML - Remove init_irq_signals
Date: Wed, 2 Jan 2008 15:08:54 -0500	[thread overview]
Message-ID: <20080102200854.GA7964@c2.user-mode-linux.org> (raw)

init_irq_signals doesn't need to be called from the context of a new
process.  It initializes handlers, which are useless in process
context.  With that call gone, init_irq_signals has only one caller,
so it can be inlined into init_new_thread_signals.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
 arch/um/include/os.h       |    1 -
 arch/um/os-Linux/irq.c     |   11 -----------
 arch/um/os-Linux/process.c |    5 ++++-
 3 files changed, 4 insertions(+), 13 deletions(-)

Index: linux-2.6-git/arch/um/include/os.h
===================================================================
--- linux-2.6-git.orig/arch/um/include/os.h	2007-12-13 12:43:29.000000000 -0500
+++ linux-2.6-git/arch/um/include/os.h	2007-12-13 17:48:06.000000000 -0500
@@ -285,7 +285,6 @@ extern void os_free_irq_later(struct irq
 extern int os_get_pollfd(int i);
 extern void os_set_pollfd(int i, int fd);
 extern void os_set_ioignore(void);
-extern void init_irq_signals(int on_sigstack);
 
 /* sigio.c */
 extern int add_sigio_fd(int fd);
Index: linux-2.6-git/arch/um/os-Linux/irq.c
===================================================================
--- linux-2.6-git.orig/arch/um/os-Linux/irq.c	2007-12-13 12:43:21.000000000 -0500
+++ linux-2.6-git/arch/um/os-Linux/irq.c	2007-12-13 17:48:06.000000000 -0500
@@ -136,14 +136,3 @@ void os_set_ioignore(void)
 {
 	signal(SIGIO, SIG_IGN);
 }
-
-void init_irq_signals(int on_sigstack)
-{
-	int flags;
-
-	flags = on_sigstack ? SA_ONSTACK : 0;
-
-	set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
-		    SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
-	signal(SIGWINCH, SIG_IGN);
-}
Index: linux-2.6-git/arch/um/os-Linux/process.c
===================================================================
--- linux-2.6-git.orig/arch/um/os-Linux/process.c	2007-12-13 12:42:57.000000000 -0500
+++ linux-2.6-git/arch/um/os-Linux/process.c	2007-12-13 17:48:06.000000000 -0500
@@ -249,7 +249,10 @@ void init_new_thread_signals(void)
 		    SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
 	signal(SIGHUP, SIG_IGN);
 
-	init_irq_signals(1);
+	set_handler(SIGIO, (__sighandler_t) sig_handler,
+		    SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM,
+		    SIGVTALRM, -1);
+	signal(SIGWINCH, SIG_IGN);
 }
 
 int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Dike <jdike@addtoit.com>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [PATCH 6/7] UML - Remove init_irq_signals
Date: Wed, 2 Jan 2008 15:08:54 -0500	[thread overview]
Message-ID: <20080102200854.GA7964@c2.user-mode-linux.org> (raw)

init_irq_signals doesn't need to be called from the context of a new
process.  It initializes handlers, which are useless in process
context.  With that call gone, init_irq_signals has only one caller,
so it can be inlined into init_new_thread_signals.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
 arch/um/include/os.h       |    1 -
 arch/um/os-Linux/irq.c     |   11 -----------
 arch/um/os-Linux/process.c |    5 ++++-
 3 files changed, 4 insertions(+), 13 deletions(-)

Index: linux-2.6-git/arch/um/include/os.h
===================================================================
--- linux-2.6-git.orig/arch/um/include/os.h	2007-12-13 12:43:29.000000000 -0500
+++ linux-2.6-git/arch/um/include/os.h	2007-12-13 17:48:06.000000000 -0500
@@ -285,7 +285,6 @@ extern void os_free_irq_later(struct irq
 extern int os_get_pollfd(int i);
 extern void os_set_pollfd(int i, int fd);
 extern void os_set_ioignore(void);
-extern void init_irq_signals(int on_sigstack);
 
 /* sigio.c */
 extern int add_sigio_fd(int fd);
Index: linux-2.6-git/arch/um/os-Linux/irq.c
===================================================================
--- linux-2.6-git.orig/arch/um/os-Linux/irq.c	2007-12-13 12:43:21.000000000 -0500
+++ linux-2.6-git/arch/um/os-Linux/irq.c	2007-12-13 17:48:06.000000000 -0500
@@ -136,14 +136,3 @@ void os_set_ioignore(void)
 {
 	signal(SIGIO, SIG_IGN);
 }
-
-void init_irq_signals(int on_sigstack)
-{
-	int flags;
-
-	flags = on_sigstack ? SA_ONSTACK : 0;
-
-	set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
-		    SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
-	signal(SIGWINCH, SIG_IGN);
-}
Index: linux-2.6-git/arch/um/os-Linux/process.c
===================================================================
--- linux-2.6-git.orig/arch/um/os-Linux/process.c	2007-12-13 12:42:57.000000000 -0500
+++ linux-2.6-git/arch/um/os-Linux/process.c	2007-12-13 17:48:06.000000000 -0500
@@ -249,7 +249,10 @@ void init_new_thread_signals(void)
 		    SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
 	signal(SIGHUP, SIG_IGN);
 
-	init_irq_signals(1);
+	set_handler(SIGIO, (__sighandler_t) sig_handler,
+		    SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM,
+		    SIGVTALRM, -1);
+	signal(SIGWINCH, SIG_IGN);
 }
 
 int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr)

             reply	other threads:[~2008-01-02 20:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02 20:08 Jeff Dike [this message]
2008-01-02 20:08 ` [PATCH 6/7] UML - Remove init_irq_signals Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080102200854.GA7964@c2.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.