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

Subversion Repositories or1k

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/* $Id: signal.h,v 1.1 2005-12-20 11:32:11 jcastillo Exp $ */
2
#ifndef _ASMSPARC_SIGNAL_H
3
#define _ASMSPARC_SIGNAL_H
4
 
5
#include <asm/sigcontext.h>
6
 
7
/* On the Sparc the signal handlers get passed a 'sub-signal' code
8
 * for certain signal types, which we document here.
9
 */
10
#define _NSIG             32
11
#define NSIG            _NSIG
12
 
13
#define SIGHUP           1
14
#define SIGINT           2
15
#define SIGQUIT          3
16
#define SIGILL           4
17
#define    SUBSIG_STACK       0
18
#define    SUBSIG_ILLINST     2
19
#define    SUBSIG_PRIVINST    3
20
#define    SUBSIG_BADTRAP(t)  (0x80 + (t))
21
 
22
#define SIGTRAP          5
23
#define SIGABRT          6
24
#define SIGIOT           6
25
 
26
#define SIGEMT           7
27
#define    SUBSIG_TAG    10
28
 
29
#define SIGFPE           8
30
#define    SUBSIG_FPDISABLED     0x400
31
#define    SUBSIG_FPERROR        0x404
32
#define    SUBSIG_FPINTOVFL      0x001
33
#define    SUBSIG_FPSTSIG        0x002
34
#define    SUBSIG_IDIVZERO       0x014
35
#define    SUBSIG_FPINEXACT      0x0c4
36
#define    SUBSIG_FPDIVZERO      0x0c8
37
#define    SUBSIG_FPUNFLOW       0x0cc
38
#define    SUBSIG_FPOPERROR      0x0d0
39
#define    SUBSIG_FPOVFLOW       0x0d4
40
 
41
#define SIGKILL          9
42
#define SIGBUS          10
43
#define    SUBSIG_BUSTIMEOUT    1
44
#define    SUBSIG_ALIGNMENT     2
45
#define    SUBSIG_MISCERROR     5
46
 
47
#define SIGSEGV         11
48
#define    SUBSIG_NOMAPPING     3
49
#define    SUBSIG_PROTECTION    4
50
#define    SUBSIG_SEGERROR      5
51
 
52
#define SIGSYS          12
53
#define SIGPIPE         13
54
#define SIGALRM         14
55
#define SIGTERM         15
56
#define SIGURG          16
57
 
58
/* SunOS values which deviate from the Linux/i386 ones */
59
#define SIGSTOP         17
60
#define SIGTSTP         18
61
#define SIGCONT         19
62
#define SIGCHLD         20
63
#define SIGTTIN         21
64
#define SIGTTOU         22
65
#define SIGIO           23
66
#define SIGPOLL         SIGIO   /* SysV name for SIGIO */
67
#define SIGXCPU         24
68
#define SIGXFSZ         25
69
#define SIGVTALRM       26
70
#define SIGPROF         27
71
#define SIGWINCH        28
72
#define SIGLOST         29
73
#define SIGUSR1         30
74
#define SIGUSR2         31
75
 
76
#ifndef __ASSEMBLY__
77
 
78
typedef unsigned long sigset_t;
79
 
80
#ifdef __KERNEL__
81
#include <asm/sigcontext.h>
82
#endif
83
 
84
/* A SunOS sigstack */
85
struct sigstack {
86
        char *the_stack;
87
        int   cur_status;
88
};
89
 
90
/* Sigvec flags */
91
#define SV_SSTACK    1     /* This signal handler should use sig-stack */
92
#define SV_INTR      2     /* Sig return should not restart system call */
93
#define SV_RESET     4     /* Set handler to SIG_DFL upon taken signal */
94
#define SV_IGNCHILD  8     /* Do not send SIGCHLD */
95
 
96
/*
97
 * sa_flags values: SA_STACK is not currently supported, but will allow the
98
 * usage of signal stacks by using the (now obsolete) sa_restorer field in
99
 * the sigaction structure as a stack pointer. This is now possible due to
100
 * the changes in signal handling. LBT 010493.
101
 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
102
 * SA_RESTART flag to get restarting signals (which were the default long ago)
103
 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
104
 */
105
#define SA_NOCLDSTOP    SV_IGNCHILD
106
#define SA_STACK        SV_SSTACK
107
#define SA_RESTART      SV_INTR
108
#define SA_ONESHOT      SV_RESET
109
#define SA_INTERRUPT    0x10
110
#define SA_NOMASK       0x20
111
#define SA_SHIRQ        0x40
112
 
113
#define SIG_BLOCK          0x01 /* for blocking signals */
114
#define SIG_UNBLOCK        0x02 /* for unblocking signals */
115
#define SIG_SETMASK        0x04 /* for setting the signal mask */
116
 
117
#ifdef __KERNEL__
118
/*
119
 * These values of sa_flags are used only by the kernel as part of the
120
 * irq handling routines.
121
 *
122
 * SA_INTERRUPT is also used by the irq handling routines.
123
 *
124
 * DJHR
125
 * SA_STATIC_ALLOC is used for the SPARC system to indicate that this
126
 * interrupt handler's irq structure should be statically allocated
127
 * by the request_irq routine.
128
 * The alternative is that arch/sparc/kernel/irq.c has carnal knowledge
129
 * of interrupt usage and that sucks. Also without a flag like this
130
 * it may be possible for the free_irq routine to attempt to free
131
 * statically allocated data.. which is NOT GOOD.
132
 *
133
 */
134
#define SA_PROBE SA_ONESHOT
135
#define SA_SAMPLE_RANDOM SA_RESTART
136
#define SA_STATIC_ALLOC         0x80
137
#endif
138
 
139
/* Type of a signal handler.  */
140
#ifdef __KERNEL__
141
typedef void (*__sighandler_t)(int, int, struct sigcontext_struct *, char *);
142
#else
143
typedef void (*__sighandler_t)(int);
144
#endif
145
 
146
#define SIG_DFL ((__sighandler_t)0)     /* default signal handling */
147
#define SIG_IGN ((__sighandler_t)1)     /* ignore signal */
148
#define SIG_ERR ((__sighandler_t)-1)    /* error return from signal */
149
 
150
struct sigaction {
151
        __sighandler_t  sa_handler;
152
        sigset_t        sa_mask;
153
        unsigned long   sa_flags;
154
};
155
 
156
#endif /* !(__ASSEMBLY__) */
157
 
158
#endif /* !(_ASMSPARC_SIGNAL_H) */

powered by: WebSVN 2.1.0

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