#include <linux/ptrace.h>
#include <asm/param.h>
#include <asm/uaccess.h>
+#include <asm/unistd.h>
#include <asm/siginfo.h>
/*
* 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();
}
/**
- * 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
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)
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,
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.
*/
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.
*/
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)
return -ERESTARTNOHAND;
}
-#endif /* HAVE_ARCH_SYS_PAUSE */
+#endif
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);
}