patch-2.1.79 linux/include/asm-sparc/signal.h

Next file: linux/include/asm-sparc/socket.h
Previous file: linux/include/asm-sparc/siginfo.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/include/asm-sparc/signal.h linux/include/asm-sparc/signal.h
@@ -1,4 +1,4 @@
-/* $Id: signal.h,v 1.30 1996/12/24 08:59:36 davem Exp $ */
+/* $Id: signal.h,v 1.31 1997/12/14 23:24:41 ecd Exp $ */
 #ifndef _ASMSPARC_SIGNAL_H
 #define _ASMSPARC_SIGNAL_H
 
@@ -7,15 +7,13 @@
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
 #include <linux/personality.h>
+#include <linux/types.h>
 #endif
 #endif
 
 /* On the Sparc the signal handlers get passed a 'sub-signal' code
  * for certain signal types, which we document here.
  */
-#define _NSIG             32
-#define NSIG		_NSIG
-
 #define SIGHUP		 1
 #define SIGINT		 2
 #define SIGQUIT		 3
@@ -80,13 +78,37 @@
 #define SIGUSR1		30
 #define SIGUSR2		31
 
+/* Most things should be clean enough to redefine this at will, if care
+ * is taken to make libc match.
+ */
+
+#define __OLD_NSIG	32
+#define __NEW_NSIG	64
+#define _NSIG_BPW	32
+#define _NSIG_WORDS	(__NEW_NSIG / _NSIG_BPW)
+
+#define SIGRTMIN	32
+#define SIGRTMAX	(__NEW_NSIG - 1)
+
+#if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__)
+#define	_NSIG		__NEW_NSIG
+#define __new_sigset_t	sigset_t
+#define __new_sigaction	sigaction
+#define __old_sigset_t	old_sigset_t
+#define __old_sigaction	old_sigaction
+#else
+#define _NSIG		__OLD_NSIG
+#define __old_sigset_t	sigset_t
+#define __old_sigaction	sigaction
+#endif
+
 #ifndef __ASSEMBLY__
 
-typedef unsigned long sigset_t;
+typedef unsigned long __old_sigset_t;
 
-#ifdef __KERNEL__
-#include <asm/sigcontext.h>
-#endif
+typedef struct {
+	unsigned long	sig[_NSIG_WORDS];
+} __new_sigset_t;
 
 /* A SunOS sigstack */
 struct sigstack {
@@ -116,6 +138,8 @@
 #define SA_INTERRUPT	0x10
 #define SA_NOMASK	0x20
 #define SA_SHIRQ	0x40
+#define SA_NOCLDWAIT	0x100	/* not supported yet */
+#define SA_SIGINFO	0x200
 
 #define SIG_BLOCK          0x01	/* for blocking signals */
 #define SIG_UNBLOCK        0x02	/* for unblocking signals */
@@ -154,12 +178,30 @@
 #define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
 #define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
 
-struct sigaction {
-	__sighandler_t  sa_handler;
-	sigset_t        sa_mask;
-	unsigned long   sa_flags;
-	void (*sa_restorer) (void);     /* not used by Linux/SPARC yet */
+struct __new_sigaction {
+	__sighandler_t	sa_handler;
+	unsigned long	sa_flags;
+	void		(*sa_restorer)(void);	/* Not used by Linux/SPARC */
+	__new_sigset_t	sa_mask;
+};
+
+struct k_sigaction {
+	struct __new_sigaction	sa;
+	void			*ka_restorer;
 };
+
+struct __old_sigaction {
+	__sighandler_t	sa_handler;
+	__old_sigset_t	sa_mask;
+	unsigned long	sa_flags;
+	void		(*sa_restorer) (void);	/* not used by Linux/SPARC */
+};
+
+typedef struct sigaltstack {
+	void		*ss_sp;
+	int		ss_flags;
+	__kernel_size_t	ss_size;
+} stack_t;
 
 #endif /* !(__ASSEMBLY__) */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov