OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-mips/] [signal.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef __ASM_MIPS_SIGNAL_H
2
#define __ASM_MIPS_SIGNAL_H
3
 
4
/*
5
 * For now ...
6
 */
7
#include <linux/types.h>
8
typedef __u64   sigset_t;
9
 
10
#if 0
11
/*
12
 * This is what we should really use but the kernel can't handle
13
 * a non-scalar type yet.  Since we use 64 signals only anyway we
14
 * just use __u64 and pad another 64 bits in the kernel for now ...
15
 */
16
typedef struct {
17
        unsigned int    sigbits[4];
18
} sigset_t;
19
#endif
20
 
21
#define _NSIG           65
22
#define NSIG            _NSIG
23
 
24
/*
25
 * For 1.3.0 Linux/MIPS changed the signal numbers to be compatible the ABI.
26
 */
27
#define SIGHUP           1      /* Hangup (POSIX).  */
28
#define SIGINT           2      /* Interrupt (ANSI).  */
29
#define SIGQUIT          3      /* Quit (POSIX).  */
30
#define SIGILL           4      /* Illegal instruction (ANSI).  */
31
#define SIGTRAP          5      /* Trace trap (POSIX).  */
32
#define SIGIOT           6      /* IOT trap (4.2 BSD).  */
33
#define SIGABRT          SIGIOT /* Abort (ANSI).  */
34
#define SIGEMT           7
35
#define SIGFPE           8      /* Floating-point exception (ANSI).  */
36
#define SIGKILL          9      /* Kill, unblockable (POSIX).  */
37
#define SIGBUS          10      /* BUS error (4.2 BSD).  */
38
#define SIGSEGV         11      /* Segmentation violation (ANSI).  */
39
#define SIGSYS          12
40
#define SIGPIPE         13      /* Broken pipe (POSIX).  */
41
#define SIGALRM         14      /* Alarm clock (POSIX).  */
42
#define SIGTERM         15      /* Termination (ANSI).  */
43
#define SIGUSR1         16      /* User-defined signal 1 (POSIX).  */
44
#define SIGUSR2         17      /* User-defined signal 2 (POSIX).  */
45
#define SIGCHLD         18      /* Child status has changed (POSIX).  */
46
#define SIGCLD          SIGCHLD /* Same as SIGCHLD (System V).  */
47
#define SIGPWR          19      /* Power failure restart (System V).  */
48
#define SIGWINCH        20      /* Window size change (4.3 BSD, Sun).  */
49
#define SIGURG          21      /* Urgent condition on socket (4.2 BSD).  */
50
#define SIGIO           22      /* I/O now possible (4.2 BSD).  */
51
#define SIGPOLL         SIGIO   /* Pollable event occurred (System V).  */
52
#define SIGSTOP         23      /* Stop, unblockable (POSIX).  */
53
#define SIGTSTP         24      /* Keyboard stop (POSIX).  */
54
#define SIGCONT         25      /* Continue (POSIX).  */
55
#define SIGTTIN         26      /* Background read from tty (POSIX).  */
56
#define SIGTTOU         27      /* Background write to tty (POSIX).  */
57
#define SIGVTALRM       28      /* Virtual alarm clock (4.2 BSD).  */
58
#define SIGPROF         29      /* Profiling alarm clock (4.2 BSD).  */
59
#define SIGXCPU         30      /* CPU limit exceeded (4.2 BSD).  */
60
#define SIGXFSZ         31      /* File size limit exceeded (4.2 BSD).  */
61
 
62
/*
63
 * sa_flags values: SA_STACK is not currently supported, but will allow the
64
 * usage of signal stacks by using the (now obsolete) sa_restorer field in
65
 * the sigaction structure as a stack pointer. This is now possible due to
66
 * the changes in signal handling. LBT 010493.
67
 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
68
 * SA_RESTART flag to get restarting signals (which were the default long ago)
69
 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
70
 */
71
#define SA_STACK        0x1
72
#define SA_ONSTACK      SA_STACK
73
#define SA_RESTART      0x4
74
#define SA_NOCLDSTOP    0x20000
75
/* Non ABI signals */
76
#define SA_INTERRUPT    0x01000000
77
#define SA_NOMASK       0x02000000
78
#define SA_ONESHOT      0x04000000
79
#define SA_SHIRQ        0x08000000
80
 
81
#ifdef __KERNEL__
82
/*
83
 * These values of sa_flags are used only by the kernel as part of the
84
 * irq handling routines.
85
 *
86
 * SA_INTERRUPT is also used by the irq handling routines.
87
 */
88
#define SA_PROBE SA_ONESHOT
89
#define SA_SAMPLE_RANDOM SA_RESTART
90
#endif
91
 
92
#define SIG_BLOCK          1    /* for blocking signals */
93
#define SIG_UNBLOCK        2    /* for unblocking signals */
94
#define SIG_SETMASK        3    /* for setting the signal mask */
95
 
96
/* Type of a signal handler.  */
97
typedef void (*__sighandler_t)(int);
98
 
99
/* Fake signal functions */
100
#define SIG_DFL ((__sighandler_t)0)     /* default signal handling */
101
#define SIG_IGN ((__sighandler_t)1)     /* ignore signal */
102
#define SIG_ERR ((__sighandler_t)-1)    /* error return from signal */
103
 
104
struct sigaction {
105
        unsigned int    sa_flags;
106
        __sighandler_t  sa_handler;
107
        sigset_t        sa_mask;
108
        /*
109
         * To keep the ABI structure size we have to fill a little gap ...
110
         */
111
        unsigned int    sa_mask_pad[2];
112
 
113
        /* Abi says here follows reserved int[2] */
114
        void            (*sa_restorer)(void);
115
#if __mips < 3
116
        /*
117
         * For 32 bit code we have to pad struct sigaction to get
118
         * constant size for the ABI
119
         */
120
        int             pad0[1];        /* reserved */
121
#endif
122
};
123
 
124
#ifdef __KERNEL__
125
#include <asm/sigcontext.h>
126
#endif
127
 
128
#endif /* __ASM_MIPS_SIGNAL_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.