Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* $Id: sigcontext.h,v 1.14 1999/09/06 08:22:05 jj Exp $ */ |
| 2 | #ifndef __SPARC_SIGCONTEXT_H |
| 3 | #define __SPARC_SIGCONTEXT_H |
| 4 | |
| 5 | #ifdef __KERNEL__ |
| 6 | #include <asm/ptrace.h> |
| 7 | |
| 8 | #ifndef __ASSEMBLY__ |
| 9 | |
| 10 | #define __SUNOS_MAXWIN 31 |
| 11 | |
| 12 | /* This is what SunOS does, so shall I. */ |
| 13 | struct sigcontext { |
| 14 | int sigc_onstack; /* state to restore */ |
| 15 | int sigc_mask; /* sigmask to restore */ |
| 16 | int sigc_sp; /* stack pointer */ |
| 17 | int sigc_pc; /* program counter */ |
| 18 | int sigc_npc; /* next program counter */ |
| 19 | int sigc_psr; /* for condition codes etc */ |
| 20 | int sigc_g1; /* User uses these two registers */ |
| 21 | int sigc_o0; /* within the trampoline code. */ |
| 22 | |
| 23 | /* Now comes information regarding the users window set |
| 24 | * at the time of the signal. |
| 25 | */ |
| 26 | int sigc_oswins; /* outstanding windows */ |
| 27 | |
| 28 | /* stack ptrs for each regwin buf */ |
| 29 | char *sigc_spbuf[__SUNOS_MAXWIN]; |
| 30 | |
| 31 | /* Windows to restore after signal */ |
| 32 | struct { |
| 33 | unsigned long locals[8]; |
| 34 | unsigned long ins[8]; |
| 35 | } sigc_wbuf[__SUNOS_MAXWIN]; |
| 36 | }; |
| 37 | |
| 38 | typedef struct { |
| 39 | struct { |
| 40 | unsigned long psr; |
| 41 | unsigned long pc; |
| 42 | unsigned long npc; |
| 43 | unsigned long y; |
| 44 | unsigned long u_regs[16]; /* globals and ins */ |
| 45 | } si_regs; |
| 46 | int si_mask; |
| 47 | } __siginfo_t; |
| 48 | |
| 49 | typedef struct { |
| 50 | unsigned long si_float_regs [32]; |
| 51 | unsigned long si_fsr; |
| 52 | unsigned long si_fpqdepth; |
| 53 | struct { |
| 54 | unsigned long *insn_addr; |
| 55 | unsigned long insn; |
| 56 | } si_fpqueue [16]; |
| 57 | } __siginfo_fpu_t; |
| 58 | |
| 59 | #endif /* !(__ASSEMBLY__) */ |
| 60 | |
| 61 | #endif /* (__KERNEL__) */ |
| 62 | |
| 63 | #endif /* !(__SPARC_SIGCONTEXT_H) */ |