fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / linux / signal.h
index 7be18b5..1474905 100644 (file)
@@ -1,23 +1,12 @@
 #ifndef _LINUX_SIGNAL_H
 #define _LINUX_SIGNAL_H
 
-#include <linux/list.h>
-#include <linux/spinlock.h>
 #include <asm/signal.h>
 #include <asm/siginfo.h>
 
 #ifdef __KERNEL__
-
-/*
- * These values of sa_flags are used only by the kernel as part of the
- * irq handling routines.
- *
- * SA_INTERRUPT is also used by the irq handling routines.
- * SA_SHIRQ is for shared interrupt support on PCI and EISA.
- */
-#define SA_PROBE               SA_ONESHOT
-#define SA_SAMPLE_RANDOM       SA_RESTART
-#define SA_SHIRQ               0x04000000
+#include <linux/list.h>
+#include <linux/spinlock.h>
 
 /*
  * Real Time signals may be queued.
@@ -25,7 +14,6 @@
 
 struct sigqueue {
        struct list_head list;
-       spinlock_t *lock;
        int flags;
        siginfo_t info;
        struct user_struct *user;
@@ -82,6 +70,23 @@ static inline int sigfindinword(unsigned long word)
 
 #endif /* __HAVE_ARCH_SIG_BITOPS */
 
+static inline int sigisemptyset(sigset_t *set)
+{
+       extern void _NSIG_WORDS_is_unsupported_size(void);
+       switch (_NSIG_WORDS) {
+       case 4:
+               return (set->sig[3] | set->sig[2] |
+                       set->sig[1] | set->sig[0]) == 0;
+       case 2:
+               return (set->sig[1] | set->sig[0]) == 0;
+       case 1:
+               return set->sig[0] == 0;
+       default:
+               _NSIG_WORDS_is_unsupported_size();
+               return 0;
+       }
+}
+
 #define sigmask(sig)   (1UL << ((sig) - 1))
 
 #ifndef __HAVE_ARCH_SIG_SETOPS
@@ -220,6 +225,8 @@ static inline void init_sigpending(struct sigpending *sig)
        INIT_LIST_HEAD(&sig->list);
 }
 
+extern void flush_sigqueue(struct sigpending *queue);
+
 /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
 static inline int valid_signal(unsigned long sig)
 {
@@ -234,6 +241,8 @@ extern int sigprocmask(int, sigset_t *, sigset_t *);
 struct pt_regs;
 extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
 
+extern struct kmem_cache *sighand_cachep;
+
 #endif /* __KERNEL__ */
 
 #endif /* _LINUX_SIGNAL_H */