]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] asm/signal.h unification
authorAl Viro <viro@www.linux.org.uk>
Wed, 4 May 2005 04:40:12 +0000 (05:40 +0100)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 4 May 2005 14:33:15 +0000 (07:33 -0700)
New file - asm-generic/signal.h.  Contains declarations of
__sighandler_t, __sigrestore_t, SIG_DFL, SIG_IGN, SIG_ERR and default
definitions of SIG_BLOCK, SIG_UNBLOCK and SIG_SETMASK.

asm-*/signal.h switched to including it.  The only exception is
asm-parisc/signal.h that wants its own declaration of __sighandler_t;
that one is left as-is.

asm-ppc64/signal.h required one more thing - unlike everybody else it
used __sigrestorer_t instead of usual __sigrestore_t.  PPC64 switched to
common spelling.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 files changed:
include/asm-alpha/signal.h
include/asm-arm/signal.h
include/asm-arm26/signal.h
include/asm-cris/signal.h
include/asm-frv/signal.h
include/asm-generic/signal.h [new file with mode: 0644]
include/asm-h8300/signal.h
include/asm-i386/signal.h
include/asm-ia64/signal.h
include/asm-m32r/signal.h
include/asm-m68k/signal.h
include/asm-m68knommu/signal.h
include/asm-mips/signal.h
include/asm-ppc/signal.h
include/asm-ppc64/signal.h
include/asm-s390/signal.h
include/asm-sh/signal.h
include/asm-sh64/signal.h
include/asm-sparc/signal.h
include/asm-sparc64/signal.h
include/asm-v850/signal.h
include/asm-x86_64/signal.h

index 4e0842b415aa2d317a8c2b4e586eed30aa8da183..1a2c52a056fb8cc23f985ea2b1aea674ab4e2262 100644 (file)
@@ -113,16 +113,7 @@ typedef unsigned long sigset_t;
 #define SIG_UNBLOCK        2   /* for unblocking signals */
 #define SIG_SETMASK        3   /* for setting the signal mask */
 
-/* Type of a signal handler.  */
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct osf_sigaction {
index b860dc3c5dc71ca994363246a0739f759a48a720..46e69ae395af53a9d2c7db10be7479ec12836678 100644 (file)
@@ -117,20 +117,7 @@ typedef unsigned long sigset_t;
 #define SA_IRQNOMASK           0x08000000
 #endif
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index a1aacefa6562cbc9d035dbb01e36177fa3ef3bb7..dedb29280303c719177637ca150cf75b79096c5c 100644 (file)
@@ -117,16 +117,7 @@ typedef unsigned long sigset_t;
 #define SA_IRQNOMASK           0x08000000
 #endif
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index 2330769ba55dc758ba2230f0179fc78856acb8e6..dfe039593a78d067e9478826a2fac0876b4d0d27 100644 (file)
@@ -108,16 +108,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index c930bb176875741e134a5e55a2c42ca24804d5ab..d407bde57ecaaf6f56e812731bf3c7072d55fd5b 100644 (file)
@@ -107,16 +107,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h
new file mode 100644 (file)
index 0000000..9418d6e
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef SIG_BLOCK
+#define SIG_BLOCK          0   /* for blocking signals */
+#endif
+#ifndef SIG_UNBLOCK
+#define SIG_UNBLOCK        1   /* for unblocking signals */
+#endif
+#ifndef SIG_SETMASK
+#define SIG_SETMASK        2   /* for setting the signal mask */
+#endif
+
+#ifndef __ASSEMBLY__
+typedef void __signalfn_t(int);
+typedef __signalfn_t __user *__sighandler_t;
+
+typedef void __restorefn_t(void);
+typedef __restorefn_t __user *__sigrestore_t;
+
+#define SIG_DFL        ((__force __sighandler_t)0)     /* default signal handling */
+#define SIG_IGN        ((__force __sighandler_t)1)     /* ignore signal */
+#define SIG_ERR        ((__force __sighandler_t)-1)    /* error return from signal */
+#endif
index ac3e01bd639666856421be05cc41f35bcbce71d9..8eccdc1761635a71ff3802726694297647bebf76 100644 (file)
@@ -107,16 +107,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index 0f082bd1c4557ed1049d596b41e8062e7dfe51d8..cbb47d34aa31402f1f102183635fc5b31eff66c8 100644 (file)
@@ -110,20 +110,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index 85a577ae91467126092cdde23875114c60104d06..608168d713d374293847753114173622ff0853c1 100644 (file)
 
 #endif /* __KERNEL__ */
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 # ifndef __ASSEMBLY__
 
 /* Avoid too many header ordering problems.  */
 struct siginfo;
 
-/* Type of a signal handler.  */
-typedef void __user (*__sighandler_t)(int);
-
 typedef struct sigaltstack {
        void __user *ss_sp;
        int ss_flags;
index 6e55fd421883c74624c18ab251b8bfefea8ed313..95f69b1919537c0972a6486b9e53377e8573e830 100644 (file)
@@ -114,20 +114,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index 1d016e9f19bf2787ed71091711ad88b91e324eef..a0cdf908237244d598f2a63104822ea5bba3bb51 100644 (file)
@@ -105,29 +105,20 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
        __sighandler_t sa_handler;
        old_sigset_t sa_mask;
        unsigned long sa_flags;
-       void (*sa_restorer)(void);
+       __sigrestore_t sa_restorer;
 };
 
 struct sigaction {
        __sighandler_t sa_handler;
        unsigned long sa_flags;
-       void (*sa_restorer)(void);
+       __sigrestore_t sa_restorer;
        sigset_t sa_mask;               /* mask last for extensibility */
 };
 
index 37c9c8a024ba0bc8f3cff435c922b2ba1af46769..1d13187f60629885185bbfaf4757c2796e706655 100644 (file)
@@ -105,16 +105,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index d81356731eb6abee8e54e5d28d3c27832e7f2ef9..f2c470f1d369d1228aee9132f39d4c49bfac4460 100644 (file)
@@ -103,14 +103,7 @@ typedef unsigned long old_sigset_t;                /* at least 32 bits */
 #define SIG_SETMASK    3       /* for setting the signal mask */
 #define SIG_SETMASK32  256     /* Goodie from SGI for BSD compatibility:
                                   set only the low 32 bit of the sigset.  */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-/* Fake signal functions */
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 struct sigaction {
        unsigned int    sa_flags;
index d890dabd5a69ba983719f73518604db667652707..caf6ede3710f7a7b1e71b9923ff5f24c5c75e70a 100644 (file)
@@ -100,20 +100,7 @@ typedef struct {
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 struct old_sigaction {
        __sighandler_t sa_handler;
index a2d7bbb4befdc3c9160c2b71db834cea29a3f247..432df7dd355d86651eccf4e6d27f63da7e6f8699 100644 (file)
@@ -97,33 +97,19 @@ typedef struct {
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void __sigfunction(int);
-typedef __sigfunction __user * __sighandler_t;
-
-/* Type of the restorer function */
-typedef void __sigrestorer(void);
-typedef __sigrestorer __user * __sigrestorer_t;
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 struct old_sigaction {
        __sighandler_t sa_handler;
        old_sigset_t sa_mask;
        unsigned long sa_flags;
-       __sigrestorer_t sa_restorer;
+       __sigrestore_t sa_restorer;
 };
 
 struct sigaction {
        __sighandler_t sa_handler;
        unsigned long sa_flags;
-       __sigrestorer_t sa_restorer;
+       __sigrestore_t sa_restorer;
        sigset_t sa_mask;               /* mask last for extensibility */
 };
 
index bfed83a818ccd3f21d662f96b7fe67c0349bc9fc..3d6e11c6c1fdd94a4568e1bd230bbdfb25733f3b 100644 (file)
@@ -117,16 +117,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ     2048
 #define SIGSTKSZ        8192
 
-#define SIG_BLOCK          0    /* for blocking signals */
-#define SIG_UNBLOCK        1    /* for unblocking signals */
-#define SIG_SETMASK        2    /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index 29f1ac1bf4dfe7fe888c7d3fb8330fc944053e80..d6e8eb0e65c71c5394b37578ce991c29798e76ba 100644 (file)
@@ -108,16 +108,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index 864c94ecc98cadfde65f0be9051f6e519aa25d74..2400dc688a657d477d4209c1487c81f6a2979353 100644 (file)
@@ -107,16 +107,7 @@ typedef struct {
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       THREAD_SIZE
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct old_sigaction {
index f792e10e704f6eee4a9b4645d86d813c306dcc56..aa9960ad0ca9d2d4039767ffbdf33a80d3bef832 100644 (file)
@@ -174,16 +174,7 @@ struct sigstack {
 #define SA_STATIC_ALLOC                0x80
 #endif
 
-/* Type of a signal handler.  */
-#ifdef __KERNEL__
-typedef void (*__sighandler_t)(int, int, struct sigcontext *, char *);
-#else
-typedef void (*__sighandler_t)(int);
-#endif
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 struct __new_sigaction {
index 466d021d703832bf656d954a6dd000353383a210..becdf1bc59245fd7f8f5d8c5866ce7d2f159ca90 100644 (file)
@@ -177,21 +177,7 @@ struct sigstack {
 #define SA_STATIC_ALLOC                0x80
 #endif
 
-/* Type of a signal handler.  */
-#ifdef __KERNEL__
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-#else
-typedef void (*__sighandler_t)(int);
-typedef void (*__sigrestore_t)(void);
-#endif
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+#include <asm-generic/signal.h>
 
 struct __new_sigaction {
        __sighandler_t          sa_handler;
index ec3566c875d9ed21f903736cd179495040225940..cb52caa69925b4ae669675c605456df4bfd02a3a 100644 (file)
@@ -110,17 +110,7 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
-
+#include <asm-generic/signal.h>
 
 #ifdef __KERNEL__
 
index 4987ad8082ba05a9e739164847c95f440b9c1ca3..fe9b96d94815f688091d6c1318e1905d8c995ac8 100644 (file)
@@ -116,21 +116,9 @@ typedef unsigned long sigset_t;
 #define MINSIGSTKSZ    2048
 #define SIGSTKSZ       8192
 
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
+#include <asm-generic/signal.h>
 
 #ifndef __ASSEMBLY__
-/* Type of a signal handler.  */
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
 
 struct sigaction {
        __sighandler_t sa_handler;