]> err.no Git - linux-2.6/commitdiff
[POWERPC] Consolidate restore_sigmask
authorChristoph Hellwig <hch@lst.de>
Mon, 4 Jun 2007 05:15:51 +0000 (15:15 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 14 Jun 2007 12:29:58 +0000 (22:29 +1000)
restore_sigmask is exactly the same on 32 and 64bit, so move it to
common code.  Also move _BLOCKABLE to signal.h to avoid defining it
multiple times.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/signal.c
arch/powerpc/kernel/signal.h
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c

index 325d260abd4e21e0663d3fbfe6df17e10ae0bff8..f92856b98b703117bba18ee941ad9ac70322b2c5 100644 (file)
 #include <linux/signal.h>
 #include <asm/unistd.h>
 
+#include "signal.h"
+
+
+/*
+ * Restore the user process's signal mask
+ */
+void restore_sigmask(sigset_t *set)
+{
+       sigdelsetmask(set, ~_BLOCKABLE);
+       spin_lock_irq(&current->sighand->siglock);
+       current->blocked = *set;
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+}
+
 void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka,
                           int has_handler)
 {
index 1e8dfb8620adb2a3894802793f8eb61e3c475d5c..4b091d8b764c3bf8356d0ba013b50586844cbcf9 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef _POWERPC_ARCH_SIGNAL_H
 #define _POWERPC_ARCH_SIGNAL_H
 
+#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
+
+extern void restore_sigmask(sigset_t *set);
 extern void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka,
                                  int has_handler);
 
index f5713bfcc56eaa6dee0a6d045d67e3b5bb46ade2..1d899a56fa13dd37f99abee2f071d0ebc5bc6d1e 100644 (file)
@@ -55,8 +55,6 @@
 
 #undef DEBUG_SIG
 
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
 #ifdef CONFIG_PPC64
 #define do_signal      do_signal32
 #define sys_sigsuspend compat_sys_sigsuspend
@@ -697,23 +695,6 @@ int compat_sys_sigaltstack(u32 __new, u32 __old, int r5,
 }
 #endif /* CONFIG_PPC64 */
 
-
-/*
- * Restore the user process's signal mask
- */
-#ifdef CONFIG_PPC64
-extern void restore_sigmask(sigset_t *set);
-#else /* CONFIG_PPC64 */
-static void restore_sigmask(sigset_t *set)
-{
-       sigdelsetmask(set, ~_BLOCKABLE);
-       spin_lock_irq(&current->sighand->siglock);
-       current->blocked = *set;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-}
-#endif
-
 /*
  * Set up a signal frame for a "real-time" signal handler
  * (one which gets siginfo).
index 817f1cf4a405b021d0d84a0e180a3ca451731007..7e9c4b7e7e8292abaf1256ee3fd3ea4b1c03f955 100644 (file)
@@ -38,8 +38,6 @@
 
 #define DEBUG_SIG 0
 
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
 #define GP_REGS_SIZE   min(sizeof(elf_gregset_t), sizeof(struct pt_regs))
 #define FP_REGS_SIZE   sizeof(elf_fpregset_t)
 
@@ -242,19 +240,6 @@ static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp)
        return err;
 }
 
-/*
- * Restore the user process's signal mask (also used by signal32.c)
- */
-void restore_sigmask(sigset_t *set)
-{
-       sigdelsetmask(set, ~_BLOCKABLE);
-       spin_lock_irq(&current->sighand->siglock);
-       current->blocked = *set;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-}
-
-
 /*
  * Handle {get,set,swap}_context operations
  */