aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/signal_64.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-01-18 20:43:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 22:20:29 -0500
commit150256d8aadb3a337c31efa9e175cbd25bf06b06 (patch)
tree8cd7e2a0bc6af23984682c5ea3ca687809580c5a /arch/powerpc/kernel/signal_64.c
parenta60fc5190a31d98508ea6a76f74217f4104e74b7 (diff)
[PATCH] Generic sys_rt_sigsuspend()
The TIF_RESTORE_SIGMASK flag allows us to have a generic implementation of sys_rt_sigsuspend() instead of duplicating it for each architecture. This provides such an implementation and makes arch/powerpc use it. It also tidies up the ppc32 sys_sigsuspend() to use TIF_RESTORE_SIGMASK. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/powerpc/kernel/signal_64.c')
-rw-r--r--arch/powerpc/kernel/signal_64.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 7b9d999e2115..a4a6812e815e 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -67,42 +67,6 @@ struct rt_sigframe {
67 char abigap[288]; 67 char abigap[288];
68} __attribute__ ((aligned (16))); 68} __attribute__ ((aligned (16)));
69 69
70
71/*
72 * Atomically swap in the new signal mask, and wait for a signal.
73 */
74long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, int p3, int p4,
75 int p6, int p7, struct pt_regs *regs)
76{
77 sigset_t saveset, newset;
78
79 /* XXX: Don't preclude handling different sized sigset_t's. */
80 if (sigsetsize != sizeof(sigset_t))
81 return -EINVAL;
82
83 if (copy_from_user(&newset, unewset, sizeof(newset)))
84 return -EFAULT;
85 sigdelsetmask(&newset, ~_BLOCKABLE);
86
87 spin_lock_irq(&current->sighand->siglock);
88 saveset = current->blocked;
89 current->blocked = newset;
90 recalc_sigpending();
91 spin_unlock_irq(&current->sighand->siglock);
92
93 regs->result = -EINTR;
94 regs->gpr[3] = EINTR;
95 regs->ccr |= 0x10000000;
96 while (1) {
97 current->state = TASK_INTERRUPTIBLE;
98 schedule();
99 if (do_signal(&saveset, regs)) {
100 set_thread_flag(TIF_RESTOREALL);
101 return 0;
102 }
103 }
104}
105
106long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, unsigned long r5, 70long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, unsigned long r5,
107 unsigned long r6, unsigned long r7, unsigned long r8, 71 unsigned long r6, unsigned long r7, unsigned long r8,
108 struct pt_regs *regs) 72 struct pt_regs *regs)