Back to index

glibc  2.9
sigcontext.h
Go to the documentation of this file.
00001 /* Copyright (C) 2000 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
00020 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
00021 #endif
00022 
00023 #include <bits/wordsize.h>
00024 
00025 #if __WORDSIZE == 32
00026 
00027 /* It is quite hard to choose what to put here, because
00028    Linux/sparc32 had at least 3 totally incompatible
00029    signal stack layouts.
00030    This one is for the "new" style signals, which are
00031    now delivered unless SA_SIGINFO is requested.  */
00032 
00033 struct sigcontext
00034   {
00035     struct
00036       {
00037        unsigned int  psr;
00038        unsigned int  pc;
00039        unsigned int  npc;
00040        unsigned int  y;
00041        unsigned int  u_regs[16]; /* globals and ins */
00042       }                     si_regs;
00043     int                     si_mask;
00044   };
00045 
00046 #else /* sparc64 */
00047 
00048 typedef struct
00049   {
00050     unsigned int     si_float_regs [64];
00051     unsigned long    si_fsr;
00052     unsigned long    si_gsr;
00053     unsigned long    si_fprs;
00054   } __siginfo_fpu_t;
00055 
00056 struct sigcontext
00057   {
00058     char             sigc_info[128];
00059     struct
00060       {
00061        unsigned long u_regs[16]; /* globals and ins */
00062        unsigned long tstate;
00063        unsigned long tpc;
00064        unsigned long tnpc;
00065        unsigned int  y;
00066        unsigned int  fprs;
00067       }                     sigc_regs;
00068     __siginfo_fpu_t *       sigc_fpu_save;
00069     struct
00070       {
00071        void *        ss_sp;
00072        int           ss_flags;
00073        unsigned long ss_size;
00074       }                     sigc_stack;
00075     unsigned long    sigc_mask;
00076 };
00077 
00078 #endif /* sparc64 */