]> err.no Git - linux-2.6/blobdiff - include/linux/signal.h
Automatic merge of 'misc-fixes' branch from
[linux-2.6] / include / linux / signal.h
index 78bfb266e4f7e0ec9df8c6bcdc9a1fc5942419d5..0a98f5ec5caed28fdfcaa91c183e7ef181534833 100644 (file)
@@ -220,6 +220,12 @@ static inline void init_sigpending(struct sigpending *sig)
        INIT_LIST_HEAD(&sig->list);
 }
 
+/* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
+static inline int valid_signal(unsigned long sig)
+{
+       return sig <= _NSIG ? 1 : 0;
+}
+
 extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
 extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
 extern long do_sigpending(void __user *, unsigned long);