patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / kernel / signal.c
index 7a9912a..c6b2701 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/ptrace.h>
 #include <asm/param.h>
 #include <asm/uaccess.h>
+#include <asm/unistd.h>
 #include <asm/siginfo.h>
 
 /*
@@ -1406,12 +1407,12 @@ static void __wake_up_parent(struct task_struct *p,
         * Fortunately this is not necessary for thread groups:
         */
        if (p->tgid == tsk->tgid) {
-               wake_up_interruptible(&tsk->wait_chldexit);
+               wake_up_interruptible_sync(&tsk->wait_chldexit);
                return;
        }
 
        do {
-               wake_up_interruptible(&tsk->wait_chldexit);
+               wake_up_interruptible_sync(&tsk->wait_chldexit);
                tsk = next_thread(tsk);
                if (tsk->signal != parent->signal)
                        BUG();
@@ -2177,7 +2178,7 @@ sys_kill(int pid, int sig)
 }
 
 /**
- *  sys_tkill - send signal to one specific thread
+ *  sys_tgkill - send signal to one specific thread
  *  @tgid: the thread group ID of the thread
  *  @pid: the PID of the thread
  *  @sig: signal to be sent
@@ -2415,14 +2416,19 @@ out:
        return error;
 }
 
+#ifdef __ARCH_WANT_SYS_SIGPENDING
+
 asmlinkage long
 sys_sigpending(old_sigset_t __user *set)
 {
        return do_sigpending(set, sizeof(*set));
 }
 
-#if !defined(__alpha__)
-/* Alpha has its own versions with special arguments.  */
+#endif
+
+#ifdef __ARCH_WANT_SYS_SIGPROCMASK
+/* Some platforms have their own version with special arguments others
+   support only sys_rt_sigprocmask.  */
 
 asmlinkage long
 sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset)
@@ -2472,8 +2478,9 @@ sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset)
 out:
        return error;
 }
+#endif /* __ARCH_WANT_SYS_SIGPROCMASK */
 
-#ifndef __sparc__
+#ifdef __ARCH_WANT_SYS_RT_SIGACTION
 asmlinkage long
 sys_rt_sigaction(int sig,
                 const struct sigaction __user *act,
@@ -2501,11 +2508,10 @@ sys_rt_sigaction(int sig,
 out:
        return ret;
 }
-#endif /* __sparc__ */
-#endif
+#endif /* __ARCH_WANT_SYS_RT_SIGACTION */
+
+#ifdef __ARCH_WANT_SYS_SGETMASK
 
-#if !defined(__alpha__) && !defined(__ia64__) && \
-    !defined(__arm__) && !defined(__s390__)
 /*
  * For backwards compatibility.  Functionality superseded by sigprocmask.
  */
@@ -2531,10 +2537,9 @@ sys_ssetmask(int newmask)
 
        return old;
 }
-#endif /* !defined(__alpha__) */
+#endif /* __ARCH_WANT_SGETMASK */
 
-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && \
-    !defined(__arm__)
+#ifdef __ARCH_WANT_SYS_SIGNAL
 /*
  * For backwards compatibility.  Functionality superseded by sigaction.
  */
@@ -2551,9 +2556,9 @@ sys_signal(int sig, __sighandler_t handler)
 
        return ret ? ret : (unsigned long)old_sa.sa.sa_handler;
 }
-#endif /* !alpha && !__ia64__ && !defined(__mips__) && !defined(__arm__) */
+#endif /* __ARCH_WANT_SYS_SIGNAL */
 
-#ifndef HAVE_ARCH_SYS_PAUSE
+#ifdef __ARCH_WANT_SYS_PAUSE
 
 asmlinkage long
 sys_pause(void)
@@ -2563,7 +2568,7 @@ sys_pause(void)
        return -ERESTARTNOHAND;
 }
 
-#endif /* HAVE_ARCH_SYS_PAUSE */
+#endif
 
 void __init signals_init(void)
 {
@@ -2571,7 +2576,5 @@ void __init signals_init(void)
                kmem_cache_create("sigqueue",
                                  sizeof(struct sigqueue),
                                  __alignof__(struct sigqueue),
-                                 0, NULL, NULL);
-       if (!sigqueue_cachep)
-               panic("signals_init(): cannot create sigqueue SLAB cache");
+                                 SLAB_PANIC, NULL, NULL);
 }