~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-mips64/signal.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* $Id: signal.h,v 1.2 1999/09/27 16:01:40 ralf Exp $
  2  *
  3  * This file is subject to the terms and conditions of the GNU General Public
  4  * License.  See the file "COPYING" in the main directory of this archive
  5  * for more details.
  6  *
  7  * Copyright (C) 1995 - 1999 by Ralf Baechle
  8  * Copyright (C) 1999 Silicon Graphics, Inc.
  9  */
 10 #ifndef _ASM_SIGNAL_H
 11 #define _ASM_SIGNAL_H
 12 
 13 #include <linux/types.h>
 14 
 15 #define _NSIG           128
 16 #define _NSIG_BPW       64
 17 #define _NSIG_WORDS     (_NSIG / _NSIG_BPW)
 18 
 19 typedef struct {
 20         long sig[_NSIG_WORDS];
 21 } sigset_t;
 22 
 23 typedef unsigned long old_sigset_t;             /* at least 32 bits */
 24 typedef unsigned int old_sigset_t32;
 25 
 26 #define SIGHUP           1      /* Hangup (POSIX).  */
 27 #define SIGINT           2      /* Interrupt (ANSI).  */
 28 #define SIGQUIT          3      /* Quit (POSIX).  */
 29 #define SIGILL           4      /* Illegal instruction (ANSI).  */
 30 #define SIGTRAP          5      /* Trace trap (POSIX).  */
 31 #define SIGIOT           6      /* IOT trap (4.2 BSD).  */
 32 #define SIGABRT          SIGIOT /* Abort (ANSI).  */
 33 #define SIGEMT           7
 34 #define SIGFPE           8      /* Floating-point exception (ANSI).  */
 35 #define SIGKILL          9      /* Kill, unblockable (POSIX).  */
 36 #define SIGBUS          10      /* BUS error (4.2 BSD).  */
 37 #define SIGSEGV         11      /* Segmentation violation (ANSI).  */
 38 #define SIGSYS          12
 39 #define SIGPIPE         13      /* Broken pipe (POSIX).  */
 40 #define SIGALRM         14      /* Alarm clock (POSIX).  */
 41 #define SIGTERM         15      /* Termination (ANSI).  */
 42 #define SIGUSR1         16      /* User-defined signal 1 (POSIX).  */
 43 #define SIGUSR2         17      /* User-defined signal 2 (POSIX).  */
 44 #define SIGCHLD         18      /* Child status has changed (POSIX).  */
 45 #define SIGCLD          SIGCHLD /* Same as SIGCHLD (System V).  */
 46 #define SIGPWR          19      /* Power failure restart (System V).  */
 47 #define SIGWINCH        20      /* Window size change (4.3 BSD, Sun).  */
 48 #define SIGURG          21      /* Urgent condition on socket (4.2 BSD).  */
 49 #define SIGIO           22      /* I/O now possible (4.2 BSD).  */
 50 #define SIGPOLL         SIGIO   /* Pollable event occurred (System V).  */
 51 #define SIGSTOP         23      /* Stop, unblockable (POSIX).  */
 52 #define SIGTSTP         24      /* Keyboard stop (POSIX).  */
 53 #define SIGCONT         25      /* Continue (POSIX).  */
 54 #define SIGTTIN         26      /* Background read from tty (POSIX).  */
 55 #define SIGTTOU         27      /* Background write to tty (POSIX).  */
 56 #define SIGVTALRM       28      /* Virtual alarm clock (4.2 BSD).  */
 57 #define SIGPROF         29      /* Profiling alarm clock (4.2 BSD).  */
 58 #define SIGXCPU         30      /* CPU limit exceeded (4.2 BSD).  */
 59 #define SIGXFSZ         31      /* File size limit exceeded (4.2 BSD).  */
 60 
 61 /* These should not be considered constants from userland.  */
 62 #define SIGRTMIN        32
 63 #define SIGRTMAX        (_NSIG-1)
 64 
 65 /*
 66  * SA_FLAGS values:
 67  *
 68  * SA_ONSTACK indicates that a registered stack_t will be used.
 69  * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
 70  * SA_RESTART flag to get restarting signals (which were the default long ago)
 71  * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
 72  * SA_RESETHAND clears the handler when the signal is delivered.
 73  * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
 74  * SA_NODEFER prevents the current signal from being masked in the handler.
 75  *
 76  * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
 77  * Unix names RESETHAND and NODEFER respectively.
 78  */
 79 #define SA_ONSTACK      0x08000000
 80 #define SA_RESETHAND    0x80000000
 81 #define SA_RESTART      0x10000000
 82 #define SA_SIGINFO      0x00000008
 83 #define SA_NODEFER      0x40000000
 84 #define SA_NOCLDWAIT    0x00010000      /* Not supported yet */
 85 #define SA_NOCLDSTOP    0x00000001
 86 
 87 #define SA_NOMASK       SA_NODEFER
 88 #define SA_ONESHOT      SA_RESETHAND
 89 #define SA_INTERRUPT    0x20000000      /* dummy -- ignored */
 90 
 91 #define SA_RESTORER     0x04000000
 92 
 93 /* 
 94  * sigaltstack controls
 95  */
 96 #define SS_ONSTACK     1
 97 #define SS_DISABLE     2
 98 
 99 #define MINSIGSTKSZ    2048
100 #define SIGSTKSZ       8192
101 
102 #ifdef __KERNEL__
103 
104 /*
105  * These values of sa_flags are used only by the kernel as part of the
106  * irq handling routines.
107  *
108  * SA_INTERRUPT is also used by the irq handling routines.
109  * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
110  */
111 #define SA_PROBE                SA_ONESHOT
112 #define SA_SAMPLE_RANDOM        SA_RESTART
113 #define SA_SHIRQ                0x02000000
114 
115 #endif /* __KERNEL__ */
116 
117 #define SIG_BLOCK       1       /* for blocking signals */
118 #define SIG_UNBLOCK     2       /* for unblocking signals */
119 #define SIG_SETMASK     3       /* for setting the signal mask */
120 #define SIG_SETMASK32   256     /* Goodie from SGI for BSD compatibility:
121                                    set only the low 32 bit of the sigset.  */
122 
123 /* Type of a signal handler.  */
124 typedef void (*__sighandler_t)(int);
125 
126 /* Fake signal functions */
127 #define SIG_DFL ((__sighandler_t)0)     /* default signal handling */
128 #define SIG_IGN ((__sighandler_t)1)     /* ignore signal */
129 #define SIG_ERR ((__sighandler_t)-1)    /* error return from signal */
130 
131 struct sigaction {
132         unsigned int    sa_flags;
133         __sighandler_t  sa_handler;
134         sigset_t        sa_mask;
135         void            (*sa_restorer)(void);
136         int             sa_resv[1];     /* reserved */
137 };
138 
139 struct k_sigaction {
140         struct sigaction sa;
141 };
142 
143 /* IRIX compatible stack_t  */
144 typedef struct sigaltstack {
145         void *ss_sp;
146         size_t ss_size;
147         int ss_flags;
148 } stack_t;
149 
150 #ifdef __KERNEL__
151 #include <asm/sigcontext.h>
152 
153 /*
154  * The following break codes are or were in use for specific purposes in
155  * other MIPS operating systems.  Linux/MIPS doesn't use all of them.  The
156  * unused ones are here as placeholders; we might encounter them in
157  * non-Linux/MIPS object files or make use of them in the future.
158  */
159 #define BRK_USERBP      0       /* User bp (used by debuggers) */
160 #define BRK_KERNELBP    1       /* Break in the kernel */
161 #define BRK_ABORT       2       /* Sometimes used by abort(3) to SIGIOT */
162 #define BRK_BD_TAKEN    3       /* For bd slot emulation - not implemented */
163 #define BRK_BD_NOTTAKEN 4       /* For bd slot emulation - not implemented */
164 #define BRK_SSTEPBP     5       /* User bp (used by debuggers) */
165 #define BRK_OVERFLOW    6       /* Overflow check */
166 #define BRK_DIVZERO     7       /* Divide by zero check */
167 #define BRK_RANGE       8       /* Range error check */
168 #define BRK_STACKOVERFLOW 9     /* For Ada stackchecking */
169 #define BRK_NORLD       10      /* No rld found - not used by Linux/MIPS */
170 #define _BRK_THREADBP   11      /* For threads, user bp (used by debuggers) */
171 #define BRK_MULOVF      1023    /* Multiply overflow */
172 #endif /* defined (__KERNEL__) || defined (__USE_MISC) */
173 
174 #endif /* !defined (_ASM_SIGNAL_H) */
175 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.